Learn R Programming

shazam (version 0.1.4)

summarizeBaseline: Calculate BASELINe summary statistics

Description

summarizeBaseline calculates BASELINe statistics such as the selection strength (Sigma), the 95% confidence intervals and P-values.

Usage

summarizeBaseline(baseline, returnType = c("baseline", "df"), nproc = 1)

Arguments

baseline
Baseline object returned by calcBaseline containing annotations and BASELINe posterior probability density functions (PDFs) for each sequence.
returnType
One of c("baseline", "df") defining whether to return a Baseline object ("baseline") with an updated stats slot or a data.frame ("df") of summary statistics.
nproc
number of cores to distribute the operation over. If nproc = 0 then the cluster has already been set and will not be reset.

Value

Either a modified Baseline object or data.frame containing the BASELINe selection strength, 95% confidence intervals and P-value.

See Also

See calcBaseline for generating Baseline objects and groupBaseline for convolving groups of BASELINe PDFs.

Examples

Run this code
# Subset example data
data(ExampleDb, package="alakazam")
db <- subset(ExampleDb, ISOTYPE %in% c("IgA", "IgG") & SAMPLE == "+7d")

# Calculate BASELINe
baseline <- calcBaseline(db, 
                         sequenceColumn="SEQUENCE_IMGT",
                         germlineColumn="GERMLINE_IMGT_D_MASK", 
                         testStatistic="focused",
                         regionDefinition=IMGT_V_NO_CDR3,
                         targetingModel = HS5FModel,
                         nproc = 1)

# Grouping the PDFs by the sample and isotype annotations
grouped <- groupBaseline(baseline, groupBy=c("SAMPLE", "ISOTYPE"))

# Get a data.frame of the summary statistics
stats <- summarizeBaseline(grouped, returnType="df")
                     

Run the code above in your browser using DataLab