joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
567 stars 187 forks source link

how to replace "unidentified" taxa as NA in phyloseq object #1696

Closed plaw1985 closed 10 months ago

plaw1985 commented 11 months ago

1 e82d1fd257973270273e7afa6a946525 Fungi Ascomycota Leotiomycetes unidentified 2 6216312bc6d47f49897e454a2ab33c46 Fungi Rozellomycota unidentified unidentified 3 373a26a407912bac4da130de18cb1953 Fungi Chytridiomycota unidentified unidentified 4 ec561da51b50d2ff3e692cdca8f9e211 Fungi unidentified unidentified unidentified 5 7785baaf09a0bb304f825e78da9ddc18 Fungi Basidiomycota unidentified unidentified

How to replace unidentified with NA. Please help

samd1993 commented 11 months ago

You can use a basic find and replace function in R on your phyloseqobject@tax_table. Adding the @ sign is how you call on your taxonomy table in phyloseq

plaw1985 commented 10 months ago

Yes. Found it. thank you