Problems in filter_taxa_from_otu_table

15 views
Skip to first unread message

amulya shastry

unread,
Aug 23, 2017, 3:19:47 PM8/23/17
to Qiime 1 Forum
Hello, 

I am unable to remove few groups from my otu table which is listed as D_0__Bacteria;Other;Other;Other 


I used the command filter_taxa_from_otu_table.py -i otu_table.biom -o otu_table_new -n Other 
also tried -n D_0__Bacteria 

None of them work. The command works properly and gives me an output file but I can still see the group in the new file. Any help will be appreciated. 


Thanks,
Amulya 


Jose

unread,
Aug 24, 2017, 9:28:14 AM8/24/17
to Qiime 1 Forum
Hi Amulya,

assuming this is a regular OTU table, you can remove that taxa by doing the following:

1) Convert the biom file to text file
biom convert -i otu_table.biom -o otu_table.txt --to-tsv --header-key="taxonomy"
2) find the OTUs that have the desired taxonomy string:
grep "D_0__Bacteria;Other;Other;Other" | awk 'BEGIN{FS="\t"}{print $1} > otu_ids_to_remove.txt
3) remove the taxa:
filter_otus_from_otu_table.py -i otu_table.biom -o otu_table.filtered.biom -e otu_ids_to_remove.txt

see if that works and let us know otherwise.

Jose
Reply all
Reply to author
Forward
0 new messages