Uploading Somalogic data into Mass Dynamics
This FAQ provides guidance and an example R script for transforming SomaLogic ADAT data into a wide-format table with intensities. The output is a *.csv file that can be uploaded to the Mass Dynamics platform.
Sample data: https://somalogic.com/datadelve-statistics/
Expected SomaLogic Input Format
- A .adat file exported from SomaLogic assays.
- Each sample contains protein measurements (intensities) for a set of analytes uniquely identified by AptName.
Required fields or derived columns:
- SampleId
- PlatePosition (to uniquely identify calibrators/QC samples)
- Intensity values (in columns prefixed with seq.)
- Analyte metadata: AptName, UniProt, EntrezGeneSymbol, TargetFullName
Prepare the Data for Mass Dynamics
- Read the ADAT file into R using read_adat() from the SomaDataIO R package.
- The ADAT file is in a wide format but with samples as rows and analytes as columns. To make it suitable for Mass Dynamics the file needs to be converted to a wide format where analytes represent rows and samples are the columns.
- Analyte metadata are retrieved and merged with the measurement data using getAnalyteInfo() and a join on AptName.
R Code snippet to prepare the data
Upload to Mass Dynamics
1. Upload the intensities_somalogic.csv file
2. Follow the steps to select the columns containing protein intensities
- AptName-> ProteinGroup
- Uniprot -> ProteinIds
- EntrezGeneSymbol -> GeneName
- TargetFullName -> Description
Code in text format
library(SomaDataIO)
library(dplyr)
library(tidyr)
# Read SomaLogic ADAT file
my_adat <- read_adat("path/to/your_data.adat")
# Retrieve analyte metadata
analyte_infos <- getAnalyteInfo(my_adat)
# Convert wide-format intensity data to long format to retrieve intensities
my_adat_long <- my_adat %>%
pivot_longer(cols = starts_with("seq."), names_to = "AptName", values_to = "Intensity")
# Join long data with analyte metadata
my_adat_long <- left_join(my_adat_long, analyte_infos, by = "AptName")
# Create unique sample name using SampleId and PlatePosition
my_adat_long <- my_adat_long %>%
unite(SampleName, SampleId, PlatePosition, sep = "-", remove = FALSE)
# Pivot to wide format: one row per protein, one column per sample
intensities_table <- my_adat_long %>%
pivot_wider(
id_cols = c(AptName, UniProt, EntrezGeneSymbol, TargetFullName),
names_from = SampleName,
values_from = Intensity
)
# Write to CSV
write_csv(intensities_table, "path/to/intensities_somalogic.csv")