Learn R Programming

dowser (version 2.2.0)

testPS: Performs PS (parsimony score) test on switch data

Description

testPS performs a PS test

Usage

testPS(
  switches,
  bylineage = FALSE,
  pseudocount = 0,
  alternative = c("less", "two.sided", "greater")
)

Value

A list containing a tibble with mean PS statistics, and another with PS statistics per repetition.

Arguments

switches

Data frame from findSwitches

bylineage

Perform test for each lineage individually? (FALSE)

pseudocount

Pseudocount for P value calculations

alternative

Perform one-sided (greater or less) or two.sided test

Details

Output data table columns: RECON = PS for observed data PERMUTE = PS for permuted data DELTA = RECON - PERMUTE PLT = p value for DELTA < 0 PGT = p value for DELTA < 0

  • RECON: PS for observed data.

  • PERMUTE: PS for permuted data.

  • DELTA: RECON - PERMUTE.

  • PLT: p value that DELTA < 0

  • PGT: p value that DELTA > 0

  • STAT: Statistic used (PS).

  • REP: Bootstrap repetition.

  • REPS: Total number of ootstrap repetition.

See Also

Uses output from findSwitches. Related to testSP and testSC.

Examples

Run this code
if (FALSE) {
igphyml <- "~/apps/igphyml/src/igphyml"
data(ExampleAirr)
ExampleAirr$sample_id <- sample(ExampleAirr$sample_id)
clones <- formatClones(ExampleAirr, trait="sample_id")
btrees <- findSwitches(clones[1:2], bootstraps=10, nproc=1,
   igphyml=igphyml, trait="sample_id")
testPS(btrees$switches)
}

Run the code above in your browser using DataLab