microeco icon indicating copy to clipboard operation
microeco copied to clipboard

merge function doubt

Open jamorillo opened this issue 9 months ago • 2 comments

Dear Chi, I have some doubts about applying the merge function of microeco. If it collapses or combines all ASVs/OTUs into genera (for example), I would expect the row.names of the "OTU table" to be genera names, but instead they remain as OTUs. How can I perform this calculation within microeco? I need all data "collapsed" in genera. For example:

dataset

microtable-class object: sample_table have 90 rows and 4 columns otu_table have 404 rows and 90 columns tax_table have 404 rows and 7 columns phylo_tree have 404 tips rep_fasta have 404 sequences

dataset_Genus <- dataset$merge_taxa(taxa = "Genus") dataset_Genus

microtable-class object: sample_table have 90 rows and 4 columns otu_table have 180 rows and 90 columns tax_table have 180 rows and 6 columns

-> OK, 180 genera. BUT:

row.names(dataset_Genus$otu_table)

[1] "OTU_16" "OTU_172" "OTU_150" "OTU_12" "OTU_357" "OTU_1" "OTU_5" "OTU_34" "OTU_82" "OTU_102" "OTU_36" "OTU_2" ...

-> is here where I would expect genera names ike "Bacillus", "Pseudomonas" collapsing all ASVs belonging to the same Genus

jamorillo avatar May 24 '24 15:05 jamorillo