aggregateASV | R Documentation |
Several ASVs will be assigned to same species name. This function aggregates ASVs according to a variable (species name, accession number etc) Caution be sure than only aggregate relieable species assignments.
aggregateASV(x, by, other_str, other_num)
x |
the columns containing number of reads |
by |
The grouping variable |
other |
Columns containing classification or other valuable information |
Pedro Martinez Arbizu
taxFromWorms
data(deepMeio)
# grade >= 97 will give an indication of good species assignment
grade <- ((deepMeio$pident) + 2*(deepMeio$qcovs))/3
shortMeio <- deepMeio[grade>= 97,]
# grade > 97 will give an indication of good species assignment
# retrieve classification from WORMS
tax_deepMeio <- taxFromWorms(shortMeio$Species)
# aggregate ASVs
agg_tax_deepMeio <- aggregateASV(x=shortMeio[,9:ncol(shortMeio)], by=shortMeio$Species,other_str=tax_deepMeio[,2:6],other_num=shortMeio[,2:5])
agg_tax_deepMeio_2 <- aggregateASV(x=shortMeio[,9:ncol(shortMeio)], by=shortMeio$Species,other_num=shortMeio[,2:5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.