KasperSkytte / ampvis2

Tools for visualising microbial community amplicon data
https://kasperskytte.github.io/ampvis2/
GNU General Public License v3.0
67 stars 23 forks source link

aggregate_abund not working for my data #123

Closed ShaunAl closed 3 years ago

ShaunAl commented 3 years ago

Hi, i am trying to aggregate my data into their taxonomy so that i can use network analysis. O have prepared the data using amp_load but then when i run the command for aggregate i get this error:

aggregate_abund(abund,tax,tax_aggregate = "OTU",tax_add = NULL,calcSums = TRUE,format = "long")

Error in aggregate_abund(abund, tax, tax_aggregate = "OTU", tax_add = NULL, : could not find function "aggregate_abund"

Can anyone offer any guidance?

Best wishes

KasperSkytte commented 3 years ago

Hi there

The aggregate_abund() function is an internal function not meant to be used directly by the user, hence it is not exported. But you can always use non-exported functions by triple :, fx ampvis2:::aggregate_abund(). But keep in mind that you remove a significant portion of your data, as only where the OTU's are classified at the chosen level will be kept. Databases are incomplete, so you introduce a bias and will only be analyzing those that have good coverage in the database.