-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hi everyone,
I am trying to use metacoder to visualise differential abundance taxonomies that I have identify outside metacoder.
I create a metacoder object with the full taxonomy abundance table. And now to reduce it I try to select only taxon that I identified as differentially abundant.
I generate a table which contains :
# tax_rank taxon_names input_index
# <chr> <chr> <int>
# 1 p Firmicutes_A 4
# 2 p Firmicutes_C 6
# 3 p Firmicutes_B 527
# 4 p Firmicutes_G 646
# 5 p Bacillota_A 21
My idea was to merge it with I guess the TaxMap that is printed when we print the metacoder object. Something like :
taxon_id input_index tax_rank tax_name regex_match
<chr> <int> <chr> <chr> <chr>
aat 53 p Actinobacteriota p__Actinobacteriota
aat 53 c Actinomycetia c__Actinomycetia
aat 53 o Actinomycetales o__Actinomycetales
Then I will be able to extract taxon_id, and filter the metacoder object.
The idea is to exclude taxon such as s__unclassified_species
that can be observed multiple times, and include only those that appear at the specified input_index (is it clear ?).
I tried get_data_frame()
but it returned an error Error in obj$get_data_frame(...) : variables not of equal length
Is there any solution ?
Kind regards
Maria