rarefyFilter | R Documentation |
Rarefy a matrix to the given minimum count number column-wise using vegan's rrarefy function. If columns have less than the minimum count number, they are discarded.
rarefyFilter(x, min = 0)
x |
a matrix |
min |
minimum count to which x is to be rarefied (if equal to zero, the minimum column sum is taken as min) |
a list with the rarefied matrix (rar) and the indices of the columns that were kept (colindices)
data(david_stoolA_otus) filtered=rarefyFilter(david_stoolA_otus,min=1000) # the rarefied OTU table is stored in rar stoolARar=filtered$rar # print names of samples that were discarded because they had less than min reads discarded=setdiff(1:ncol(david_stoolA_otus),filtered$colindices) print(colnames(david_stoolA_otus)[discarded])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.