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

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

Collapsing clonal sequences...
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.2132284        -0.4239300      -0.029817347      -1.303751e-02
2    +7d     IgA    FWR     -0.7319032        -0.8841849      -0.588806275      -1.121325e-14
3    +7d     IgG    CDR     -0.1296777        -0.2682991      -0.005639158      -2.570244e-02
4    +7d     IgG    FWR     -0.6702504        -0.7797567      -0.567234804      -7.771561e-15

See also

For calculating the BASELINe summary statistics see summarizeBaseline.