Learn R Programming

shazam (version 0.1.8)

getBaselineStats: Gets the summary statistics of a Baseline object

Description

getBaselineStats is an accessor method that returns the summary statistics data.frame stored in the stats slot of a Baseline object - provided groupBaseline has already been run.

Usage

getBaselineStats(baseline)

Arguments

baseline

Baseline object that has been run through either groupBaseline or summarizeBaseline.

Value

A data.frame with the mean selection strength (mean Sigma), 95% confidence intervals, and p-values with positive signs for the presence of positive selection and/or p-values with negative signs for the presence of negative selection.

See Also

For calculating the BASELINe summary statistics see summarizeBaseline.

Examples

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

# Collapse clones
db <- collapseClones(db, sequenceColumn="SEQUENCE_IMGT",
                     germlineColumn="GERMLINE_IMGT_D_MASK",
                     method="thresholdedFreq", minimumFrequency=0.6,
                     includeAmbiguous=FALSE, breakTiesStochastic=FALSE)
                     
# Calculate BASELINe
baseline <- calcBaseline(db, 
                         sequenceColumn="SEQUENCE_IMGT",
                         germlineColumn="GERMLINE_IMGT_D_MASK", 
                         testStatistic="focused",
                         regionDefinition=IMGT_V,
                         targetingModel=HH_S5F,
                         nproc=1)

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

# Get a data.frame of the summary statistics
getBaselineStats(grouped)
# }

Run the code above in your browser using DataLab