How to filter OTU table by samples

18 views
Skip to first unread message

sampie

unread,
Jan 14, 2017, 2:08:29 AM1/14/17
to Qiime 1 Forum
Hi all!

I am using filter_otus_from_otu_table.py with --min_count_fraction to drop low abundance OTUs. However, I have combined fastq samples from two different runs which have very different sequencing depths and I would like to do this filtering so that filtering is done for each sample (in OTU table) separately. Is this possible with some QIIME tool?

Thanks

Stefan Janssen

unread,
Jan 14, 2017, 12:18:59 PM1/14/17
to Qiime 1 Forum
Hi.

You could use filter_samples_from_otu_table.py to obtain a biom table with just one sample; then use
filter_otus_from_otu_table.py to filter for OTUs in this single sample table. At the end, combine all single-sample tables with

merge_otu_tables.py


Since the above solution comes with a lot of fiddeling and might be too tideous for a huge number of samples you could alternatively use pythons pandas module and all its cool filtering and selection capabilities. Load the biom table into a pandas DataFrame, manipulate the data as you need and write it back to a new biom table. If you are firm in python, that might be the easier way.

Reply all
Reply to author
Forward
0 new messages