Learn R Programming

shazam (version 0.1.4)

testBaseline: Two-sided test of BASELINe PDFs

Description

testBaseline performs a two-sample signifance test of BASELINe posterior probability density functions (PDFs).

Usage

testBaseline(baseline, groupBy)

Arguments

baseline
Baseline object containing the db and grouped BASELINe PDFs returned by groupBaseline.
groupBy
string defining the column in the db slot of the Baseline containing sequence or group identifiers.

Value

A data.frame with test results containing the following columns:
  • REGION: sequence region, such as "CDR" and "FWR".
  • TEST: string defining the two group values compared.
  • PVALUE: two-sided p-value for the comparison.
  • FDR: FDR corrected PVALUE.

References

  1. Yaari G, et al. Quantifying selection in high-throughput immunoglobulin sequencing data sets. Nucleic Acids Res. 2012 40(17):e134.

See Also

To generate the Baseline input object see groupBaseline.

Examples

Run this code
# Subset example data
data(ExampleDb, package="alakazam")
db <- subset(ExampleDb, ISOTYPE == "IgG")

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

# Group PDFs by the sample identifier
grouped <- groupBaseline(baseline, groupBy="SAMPLE")

# Perform test on sample PDFs
testBaseline(grouped, groupBy="SAMPLE")

Run the code above in your browser using DataLab