read.CFML: Convert ClonalFrameML output.

View source: R/readCFML.R

read.CFMLR Documentation

Convert ClonalFrameML output.

Description

Convert the output of ClonalFrameML into a form usable within treeWAS.

Usage

read.CFML(prefix, tree = NULL, plot = TRUE, suff.length = 2)

Arguments

prefix

A character string containing the prefix of all file names to be read in.

Details

The prefix must be the prefix to three files ending in: (i) "labelled_tree.newick", (ii) "ML_sequence.fasta", (iii) "position_cross_reference.txt".

Value

read.CFML returns a list containing: (i) tree: The phylogenetic tree. (ii) snps: The binary genetic data matrix of polymorphic loci. (iii) snps.rec: The genetic data reconstruction matrix. (iv) seqs: The genetic data sequences (polymorphic loci only), a DNAbin object. (v) index: The index vector, indicating for each column in seqs the unique polymorphic column pattern to which it corresponds (0 = non-polymorphic). (vi) n.subs: The distribution of the number of substitutions per site. Note that all genetic data elements (ii - iv) are returned in expanded form; that is, they contain both unique and duplicate column patterns for all polymorphic loci as indicated in the index vector.

Author(s)

Caitlin Collins caitiecollins@gmail.com

Examples

## Example ##
## Not run: 
## basic use of fn
out <- read.CFML(prefix="./filename_")

## End(Not run)


caitiecollins/treeWAS documentation built on March 9, 2024, 3:15 p.m.