calc_asm {DAMEfinder} | R Documentation |
This function takes in a list of samples resulting from the read_tuples function and returns a SummarizedExperiment of Allele-Specific Methylation (ASM) scores, where each row is a tuple and each column is a sample.
calc_asm( sampleList, beta = 0.5, a = 0.2, transform = modulus_sqrt, coverage = 5, verbose = TRUE )
sampleList |
List of samples returned from |
beta |
The beta parameter used to calculate the weight in the ASM score.
|
a |
The distance from 0.5 allowed, where 0.5 is a perfect MM:UU balance for a tuple. In the default mode this value is set to 0.2, and we account for the instances where the balance is between 0.3 and 0.7. |
transform |
Transform the calculated tuple ASM scores. We use the modulus square root function which outputs the square root, while preserving the original sign. |
coverage |
Remove tuples with total reads below coverage. Default = 5. |
verbose |
If the function should be verbose. Default = TRUE. |
Calculates ASM score for a list of samples in the output format of the result of read_tuples This functions uses the following other functions: process, calcScore, calcWeight.
A SummarizedExperiment
of ASM scores where the rows are all
the tuples and the columns the sample names.
DATA_PATH_DIR <- system.file('extdata', '.', package = 'DAMEfinder') get_data_path <- function(file_name) file.path(DATA_PATH_DIR, file_name) tuple_files <- list.files(DATA_PATH_DIR, '.tsv.gz') tuple_files <- get_data_path(tuple_files) ASM <- read_tuples(tuple_files, c('CRC1', 'NORM1')) ASMscore <- calc_asm(ASM)