Biom problem sorting OTU table output

38 views
Skip to first unread message

IDA

unread,
Aug 7, 2017, 6:52:30 PM8/7/17
to Qiime 1 Forum
Hi all, 

I used biom to summarise a OTU table however the summary which comes back shows all my files in the wrong order... I looked for a command to sort them into the right order again however when I type the command it shows an error message... Any idea why this might be? 

MacQIIME Idas-MacBook-Pro:~ $ sort_otu_table.biom -i otus_SQG_joined_pairs_only/otu_table.biom -o sorted_otu_table_SQG.biom -l sample_id_list.txt

-bash: sort_otu_table.biom: command not found


also tried 

MacQIIME Idas-MacBook-Pro:~ $ sort_otu_table.biom -i otus_SQG_joined_pairs_only/otu_table.biom -o sorted_otu_table_SQG.biom -m mapping_file_SQG.txt -s SampleID

-bash: sort_otu_table.biom: command not found


Thank you, 


Ida 

IDA

unread,
Aug 7, 2017, 8:57:40 PM8/7/17
to Qiime 1 Forum
I have also tried this command using phyton instead of biom but for some reason it still doesn't work.... 

The sample order still comes out in the wrong order...

MacQIIME Idas-MacBook-Pro:~ $ sort_otu_table.py -i otu_table.biom -o sorted_otu_table.biom -l mapping_file_SQG.txt


MacQIIME Idas-MacBook-Pro:~ $ biom summarize-table -i sorted_otu_table.biom



Colin Brislawn

unread,
Aug 7, 2017, 9:01:47 PM8/7/17
to Qiime 1 Forum
Hello Ida,

Based on the examples over here, the command should be sort_otu_table.py instead of sort_otu_table.biom

Try that new command, and let me know what you find!
Colin

IDA

unread,
Aug 7, 2017, 9:03:14 PM8/7/17
to Qiime 1 Forum
Hi Colin, 

thank you for your answer, 

i tried this however still comes out in the wrong order: 

IDA

unread,
Aug 7, 2017, 9:13:56 PM8/7/17
to Qiime 1 Forum
If I skip

MacQIIME Idas-MacBook-Pro:~ $ biom summarize-table -i sorted_otu_table.biom

after running the script 

MacQIIME Idas-MacBook-Pro:~ $ sort_otu_table.py -i otu_table.biom -o sorted_otu_table.biom -l mapping_file_SQG.txt

and instead go straight to 

summarize_taxa_through_plots.py -i sorted_otu_table.biom -o taxa_summary_SQG_sorted_otu_table -m mapping_file_SQG.txt


it works and the samples come out in the right order! 


Thank you

Colin Brislawn

unread,
Aug 7, 2017, 10:08:43 PM8/7/17
to Qiime 1 Forum
Good troubleshooting, Ida. Very well done.

I think the biom summarize-table command does it's own sort, which serves to undo the other sort you performed. I'm not totally sure, though.

I'm glad you got it working,
Colin

IDA

unread,
Aug 7, 2017, 10:11:49 PM8/7/17
to Qiime 1 Forum
Thanks Colin! 

This is all new to me (only started using bioinformatic pipeline type programs this month!) so its always great when it works! 

Could you recommend any tutorial or blog where I can find info on how to make my plots a bit more pretty (add relative frequency to axis etc)? 

Thanks again, 

Ida 

Colin Brislawn

unread,
Aug 8, 2017, 12:07:33 AM8/8/17
to Qiime 1 Forum
Hello Ida,

This is all new to me (only started using bioinformatic pipeline type programs this month!) so its always great when it works! 
I'm glad it's working for you. Getting started with the computer science parts of biological science can be a big transition, and I'm really glad you are trying it and finding success.

Could you recommend any tutorial or blog where I can find info on how to make my plots a bit more pretty (add relative frequency to axis etc)? 
Yes!

The simplest option is to save / export that graph, then edit it using software like photoshop or Adobe Illustrator to change the axis labels. You can also make changes to your graphs directly using other graphing software.

Mixing statistics and graphic design is hard, but the good news is that several major software pages do this very well. The bad news is that you will have to venture outside of qiime 1 to make use of these. 

I've been using the R programming language because it includes lots of excellent stats software, and also software for making great graphs. I want to point you do the phyloseq package, which let's your import your .biom file from qiime and make all the graphs shown in the tutorials. This tutorial is a great place to start:
Phyloseq has great examples and tutorials, all of which you can find on that website.

I also found this super helpful. Here, the phyloseq dev fully replicates a published paper using phyloseq. This gives you a great sense of what you can do with this software:

I've used the Python programming language for a variety of projects, and qiime itself is written in Python. There are several excellent packages for Python plotting, and I've included two of them here:


There is lots of good way to make exactly the plot you want, so I would encourage others to 'qiime' in. 

Colin

Reply all
Reply to author
Forward
0 new messages