otu_category_significance.py on taxonomic level

51 views
Skip to first unread message

JRO

unread,
Jan 22, 2016, 4:45:05 PM1/22/16
to Qiime 1 Forum
I am trying to run the otu_category_significance.py on taxonomic levels for my data according to the directions seen on this page with the specific portion I am trying to follow quoted below:
One useful feature is to be able to run otu category significance across all taxonomic levels of an OTU table. For example, you can take your otu_table.biom and run summarize_taxa.py on it, which will create an output directory that contains your OTU table summarized at different taxonomic levels, with the file names containing L2, L3, L4 etc. to designate different taxonomic resolutions. This script allows you to “sweep” over those taxonomic levels contained within the directory by passing -i input_directory. This output will then contain an individual results file that is written for each summarized taxa table. Note for QIIME 1.6: the input directory that you pass to this script must contain biom tables. Thus, you might need to convert your summarized taxa tables that are in the classic OTU table form to biom tables using the convert_biom.pyscript.

I realize I need to use the convert_biom.py script, however the link on that page is dead, and I see that there is another biom-format script posted here which allows me to convert a .txt file to a .biom file. However when I run the script it says that the command is not found--see below:

jessicas-mbp:taxa_mappingLV JessicaOng$ biom convert -i L2_Phylum.txt -o L2_phylum.biom --table-type="OTU table" --to-json

-bash: biom: command not found


I am running Macqiime MacQIIME 1.9.1-20150604.

Thanks for your help! 

Husen Zhang

unread,
Jan 23, 2016, 11:34:26 AM1/23/16
to Qiime 1 Forum
First you want to make sure that you can even run otu_category_significance.py, which is no longer available as a script in qiime version 1.8 and newer.

Second, " -bash: biom: command not found" indicates maybe you haven't load macqiime?


JRO

unread,
Jan 25, 2016, 2:45:40 PM1/25/16
to Qiime 1 Forum
1-You are right the otu_category_significance.py script doesn't exist. But I think I could use the group_significance.py script instead?

2-Even when I have macqiime loaded I get the same response: 

MacQIIME jessicas-mbp:~ $ convert_biom.py

bash: convert_biom.py: command not found


Thanks for any input

Colin Brislawn

unread,
Jan 25, 2016, 4:07:39 PM1/25/16
to Qiime 1 Forum
Have you tried using group_significance.py directly on your .biom file? 

Using documentation for old versions of qiime, 1.7.0 in your case, will make things confusing for the new version. Stick with the newest documentation, all of which can be found here: 


Colin

JRO

unread,
Jan 25, 2016, 5:14:24 PM1/25/16
to Qiime 1 Forum
Colin

Yes I have already used the group_significance.py directly on my .biom file and it was helpful but it only analyzed my data at the species level. I was hoping there was a way for me to do the same analyses on different taxonomic levels (the only way I could seem to find was to convert my taxonomic level summary documents into .biom files, but that script doesn't work as shown above)

The only other similar script to the convert_biom.py script is the trflp_file_to_otu_table.py  which I am not sure is equivalent for what I want. 

Thanks for the last recommendation I will keep that in mind. The confusing part is that on that page under "biom-format" scripts there is a link to the "biom convert" script which I tried to use and got the response shown above. 

Thanks for any input!

Colin Brislawn

unread,
Jan 25, 2016, 6:04:49 PM1/25/16
to Qiime 1 Forum
The confusing part is that on that page under "biom-format" scripts there is a link to the "biom convert" script which I tried to use and got the response shown above. 
Yeah, some of the documentation is not as up to date as we would like. Can you send me a link to the page which lists that old command?

I looked through the list of qiime scripts, and I think I found one that will make these 'different taxonomic levels' that you want to analyze. 

Good luck :-)
Colin Brislawn


lisa.crossman

unread,
Jan 26, 2016, 4:38:41 AM1/26/16
to Qiime 1 Forum
Hi,
Not sure if this is helpful but if you are running MacQIIME and it is working, so it should definitely say MacQIIME at the beginning of the prompt then run 

MacQIIME macbookname:$  biom convert (your commands)

that SHOULD work because it does on my macbook pro running yosemite

However running convert_biom.py under MacQIIME does not, and fails with the command not found.

best w,
Lisa

JRO

unread,
Jan 26, 2016, 11:30:29 AM1/26/16
to Qiime 1 Forum
I'm running El Capitan which may be a problem, not sure. I had to do install it differently because of some security measure but here is the same response on macqiime

MacQIIME Jessicas-MacBook-Pro:taxa_LV $ -i L2_Phylum.txt -o L2_phylum.biom --table-type="OTU table" --to-json

bash: -i: command not found


Thanks for any input!  

Colin Brislawn

unread,
Jan 26, 2016, 2:23:43 PM1/26/16
to Qiime 1 Forum
Hello JRO,

You are really close! Looks like you started the command with '-i'. Try starting the command with the qiime script, like 'biom convert -i'. 

Colin Brislawn

JRO

unread,
Jan 26, 2016, 5:53:59 PM1/26/16
to Qiime 1 Forum
Everyone thank you so much for your input. I am sorry I should be more careful when I copy and paste my scripts I keep leaving and coming back to it to reply in the forum. 

Actually I ended up figuring it out I think I just confused from the old pages... In order to do statistical analyses on each taxonomic level all I just had to do the following
  1. use the "summarize_taxa.py" script to make my taxonomic summaries (my problem here was that the taxa_summary.py output didn't have the mapping file)
  2. run "group_significance.py" using the original mapping file
In hindsight it was a lot more simple than I realized and I didn't even need to convert anything. Thank you again!  

Colin Brislawn

unread,
Jan 27, 2016, 1:42:55 PM1/27/16
to Qiime 1 Forum
Glad you got it figured out! We are here to help.
Colin

Reply all
Reply to author
Forward
0 new messages