ADATs can be analyzed in R or Python using parsers created by Somalogic.
DRAGEN Protein Quantification v2.0.0 is compatible with SomaData v1.0.0 (Python - formerly called Canopy) and SomaDataIO v6.1.0 (R).
Somadata creates an ADAT object, which is an extension of a Pandas DataFrame.
rows correspond to samples
columns correspond to SOMAmers
values are normalized counts
Below are examples on parsing an ADAT in Python and R.
import somadata
# read the adat
my_adat = somadata.read_adat('/path/to/my/file1.adat')
# retrieve sample metadata
sample_meta = my_adat.index.to_frame(index=False)
# retrieve SOMAmer metadata
soma_meta = my_adat.columns.to_frame(index=False)
# retrieve the scale factors for all plates
plate_scale_factors_dict = my_adat.header_metadata['PlatformSpecificPlateScale_ScaleFactor']
### additional optional manipulation
# concatenate multiple adats into a single adat
my_adat2 = somadata.read_adat('/path/to/my/file2.adat')
my_merged_adat = soma.smart_adat_concatenation([my_adat, my_adat2])
# write it to a file
my_merged_adat = my_merged_adat.to_adat('/path/to/merged/adat')library(SomaDataIO)
# check all package functions
ls("package:SomaDataIO")
#read the adat
my_adat <- read_adat('/path/to/my/file1.adat')
# retrieve sample metadata
sample_meta <- my_adat[getMeta(my_adat)]
# retrieve SOMAmer metadata
soma_meta <- my_adat[getAnalytes(my_adat)]
# create a function that parses the header
parse_adat_header <- function(adat_file, max_lines = 500) {
header_lines <- readLines(adat_file, n = max_lines)
table_row <- grep("TABLE_BEGIN", header_lines)
header_lines[1:(table_row-1)] %>%
strsplit("\t") %>%
{
values <- map(., 2) # Get values from key value pairs
keys <- map_chr(., 1) # Get keys...
setNames(values, keys)
}
}
my_adat_header <- parse_adat_header('/path/to/my/file1.adat')
# retrieve the scale factors for all plates
plate_scale_factors_dict = my_adat_header$PlatformSpecificPlateScale_ScaleFactor
### additional optional manipulation
my_adat2 = read_adat('/path/to/my/file2.adat')
my_merged_adat = rbind(my_adat, my_adat2)
# write it to a file
my_merged_adat = write_adat(my_merged_adat, '/path/to/merged/adat')
While using the R and Python parsers is the recommended way to manipulate ADAT files, it's also possible to open and view them in Excel.
Open a blank excel workbook and browse for a file.
Confirm that "All Files (*.*)" are searchable.
Accept default parameters from Excel.
View ADAT in Excel!
Open a blank excel workbook and select File --> Import.
Select the previously downloaded .adat file.
After Click on "Get Data", select "Text file" and click on "Import".
Select Delimited (default) and click on "Next >".
Select "Tab" (default) and click on "Next >".
Select "General" (default) and click on "Next >".
Select the sheet and click on "Import".
View the ADAT in Excel!










