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.

Examples

# 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)

Calculating the expected frequencies of mutations...
Calculating BASELINe probability density functions...


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

Grouping BASELINe probability density functions...
Calculating BASELINe statistics...


# Get a data.frame of the summary statistics
getBaselineStats(grouped)
  SAMPLE ISOTYPE REGION BASELINE_SIGMA BASELINE_CI_LOWER BASELINE_CI_UPPER BASELINE_CI_PVALUE
1    +7d     IgA    CDR    -0.19271210        -0.4058692      -0.006841995      -2.431237e-02
2    +7d     IgA    FWR    -0.75752486        -0.9141143      -0.612111517      -1.121325e-14
3    +7d     IgG    CDR    -0.09634024        -0.2390083       0.032375324      -8.012879e-02
4    +7d     IgG    FWR    -0.66205655        -0.7761334      -0.555534408      -6.217249e-15

See also

For calculating the BASELINe summary statistics see summarizeBaseline.