Skip to content

Import phyloseq tax_table deactivating fillNAtax #125

@sarpiens

Description

@sarpiens

Hi I have a phyloseq object and I would like to keep the labels of my tax_table as they are and disable the fillNAtax function. In my case the taxonomy is ready to use, gaps have already been filled e.g unclassified__f__Bacteroidaceae. When I try to transform the phyloseq tax_table to treedata with the as.treedata function, I get different results:

  1. When all tax labels start with the level prefix ("d__","p__","c__","o__","f__","g__", "s__") and there are no unclassified labels, it works perfectly with out modifications.

  2. When there are tax labels that start with the level prefix ("d__","p__","c__","o__","f__","g__", "s__") and others are indicated as unclassified, unclassified taxa are keep but modified e.g unclassified__g__CAJOIG01 turns into s__un_g__CAJOIG01.

  3. When all taxa have the unclassified label, complete tax levels are removed e.g if all the labels at species level have the unclassified label this level does not appear in the nodeClass of the resulting treedata. I also have tried to add the "s__" prefix, but the result is the same, if "unclassified" is detected in all labels of the tax level it is completely removed.

Is there a way to quickly fix this? Ideally to force the as.treedata function to avoid transformation of the tax labels or at least to operate in the same way in (2) and (3) scenarios.

Thanks in advance.
Best, Sam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions