unifracMatrix | R Documentation |
Calculate the shared branch length from a matrix of taxonomic labels
unifracMatrix( xx, yy = NULL, weighted = TRUE, checkUpstream = TRUE, vocal = FALSE, mc.cores = 1 )
xx |
a matrix with a row for each read and a column for each taxonomic assignment or if yy is NULL then a list of matrices |
yy |
a matrix with a row for each read and a column for each taxonomic assignment |
weighted |
logical indicating whether to sum the differences in reads for each branch or if FALSE to look only at presence absence |
checkUpstream |
a logical indicating whether to make sure taxa with the same name are counted separetely if their upstream taxa differ e.g. two species Bos taurus and Repipta taurus. If you are sure this is not a problem, then computation can be reduced by skipping this step. |
vocal |
only used if xx is a list. If TRUE output the index as each matrix is processed |
mc.cores |
an integer giving how many cores to use for multiprocessing if xx is a list |
the proportion of the shared branches
x<-matrix(c('a','b','a','c'),ncol=2,byrow=TRUE) y<-matrix(c('a','b','a','d'),ncol=2,byrow=TRUE) unifracMatrix(x,x) unifracMatrix(x,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.