Bayes Factor Tests

PhyloSift now supports Bayes factor tests. This provides users with a statistical method to test for the presence/absence of a specific taxon amongst the input data (e.g. an environmental metagenome). Because the summary files report probability masses for sequences over a reference guide tree topology, not every reported taxon represents a true biological signal (for example, branches where placed sequences have very low probability scores). In conjunction with tree visualizations, the Bayes factor test will help users determine if a specific taxon of interest is likely to be present in their metagenome sample.

The workflow for running Bayes factor tests is as follows:

1. Run PhyloSift all mode with the --bayes flag specified.

For example, if you were running the Human Microbiome tutorial dataset, the command would be as follows:

./phylosift all --bayes --paired tutorial_data/HMP_1.fastq.gz tutorial_data/HMP_2.fastq.gz

2. Run PhyloSift test_lineage mode with the relevant flags.

You will must specify the directory containing the PhyloSift run you want to test (--sample flag), the marker gene family you are interested in (--marker flag; marker names as reported inthe .jplace tree files) and the NCBI taxon ID of the taxon you are conducting the Bayes factor test on (--taxon flag). NOTE: At present, Bayes factor tests only work on the tips of the tree. The NCBI taxon ID you use must belong to the lineage you want to test for in the reference tree. For each branch, this is the number listed in square brackets when .jplace files are visualized in guppy; for example you will see tree tips named with the following convention:  Ruminococcus_brommi_L263[657321]{994}

./phylosift test_lineage --sample PS_temp/HMP_1.fastq.gz/ --marker concat --taxon 657321

The above command conducts a Bayes factor test on amino acid data. To use nucleotide data instead (and increase the resolution and sensitivity of the Bayes factor test), you must specify the --codon flag:

./phylosift test_lineage --sample PS_temp/HMP_1.fastq.gz/ --marker concat --taxon 657321 --codon

3. Command line report showing results of Bayes factor test.

Results of the Bayes factor test will be reported on the command line, and the outputs will appear as follows: