Could you please teach me how to make an unweighted 2d plot (PCoA) of ITS data?

153 views
Skip to first unread message

yba...@hotmail.com

unread,
Jul 25, 2018, 8:49:17 AM7/25/18
to Qiime 1 Forum

I want to make an unweighted 2d plot (PCoA) of fungal data.

In case of bacterial data, I can use “unweighted_unifrac_pc.txt” for make_2d_plots.py”.

However, in case of fungal data, we cannot get the “unweighted_unifrac_pc.txt”.

How I make an unweighted 2d plot (PCoA) of ITS data?

 

[our command]

(1) pick_open_reference _otus.py

–i xxx.fna

-r its_12_11_otus/rep_set/97_otus.fasta

-o otus

-p params.txt

--suppress_align_and_tree

 

------params.txt----------

pick_otus:enable_rev_strand_match True

assign_taxonomy:assignment_method blast

assign_taxonomy:id_to_taxonomy_fp its_12_11_otus/taxonomy/97_otu_taxonomy.txt

assign_taxonomy:reference_seqs_fp its_12_11_otus/rep_set/97_otus.fasta

-----------------------------------

 

(2) sort_otu_table.py

-i otus/otu_table_mc2_w_tax.biom

-o sorted_otu_table.biom

 

(3) beta_diversity_through_plots.py

-i sorted_otu_table.biom

-o xxx/

-m map.txt

-t otus/rep_set.tre

-e xxxx

--suppress_emperor_plots

Error message: There are not “rep_set.tre” file in PC.

 

Therefore, I cannot perform following command to make an unweighted 2d plot (PCoA) of fungal data.

 

Make_2d_plots.py

-i unweighted?unifrac_pc.txt

-o 2d_plot/

-m map.txt

 

I appreciate your kind cooperation.

Colin Brislawn

unread,
Jul 26, 2018, 2:18:29 PM7/26/18
to Qiime 1 Forum
Great question!

The main error here is:

Error message: There are not “rep_set.tre” file in PC.


The file rep_set.tre is missing because of this line:

--suppress_align_and_tree


That line stops the alignment and treebuilding steps that would make the rep_set.tre file.

ITS reads don't align very well, but you could try removing the --suppress_align_and_tree to get the .tre file. You could also run this script
to get a distance matrix of jaccard distances (which does not need the .tre file the way unifra distances do).

Once you have the matrix of jaccard distances, you can use this script to make the graph:


I know this is many more steps, but this will allow you to make the PCoA plots you need without needing the .tre file.

Colin




YB

unread,
Jul 30, 2018, 6:26:31 AM7/30/18
to Qiime 1 Forum


Dear Colin

Thank you very much for giving me useful advice.
I could make a unweighted fungal PCoA.

Would you mind teaching me another question, please?

Does "group_significance.py" compare the relative abundances (%) of the samples?
or compare the numbers of raw sequences?

According to the "http://qiime.org/scripts/group_significance.html",
This script is used to compare OTU "frequencies" in sample groups and to ascertain whether or not there are statistically significant differences between the OTU "abundance"
 in the different sample groups.

However, the result (bootstrap_mann_whitney_u) showed the mean of the numbers of raw sequences.


Colin Brislawn

unread,
Jul 30, 2018, 12:07:17 PM7/30/18
to Qiime 1 Forum
Good morning,

I'm glad you were able to make at PCoA plot. Did you end up building the tree to use UniFrac distances or did you use a different distance metric?

For the group_significance.py script, the "frequencies" could mean counts or percent abundance. The Qiime developers are using the definition of 'frequencies' used by statisticians. I know I usually think 'frequencies' means 'percents' or 'fractions', but here it means counts.

You have asked really good questions. Let me know if you have more questions!
Colin

YB

unread,
Jul 31, 2018, 7:38:47 AM7/31/18
to Qiime 1 Forum
Dear Colin

Thank you for telling me.
I understood "OTU frequencies = the number of OTU".

However, I hope to make a comparison between male's gut microbial community and female's gut microbial community by using relative abundance(%)
because the number of OTU of all samples is not same each after removing chimeric sequence.
If making a comparison by using the number of OTU, it is necessary to make the number of OTU of all samples the same number.

How can I make a comparison by using relative abundance(%) by using Qiime?
Otherwise, how can I make the number of OTU of each sample the same number just before using "group_significance.py"?

[Our command flow]
(1) Making the number of each samples the same number by using "zcat | head | tail > xxx.fq".
(2) fastq-join
(3) split_libraries_fastq.py
(4) identify_chimeric_seqs.py
(5) Removing the chimeric sequences by using "filter_fast.py"
(6) pick_open_reference_otus.py
(7) group_significance.py


P.S.,

>Did you end up building the tree to use UniFrac distances or did you use a different distance metric?
I can build the tree by using UniFrac distances.

Colin Brislawn

unread,
Jul 31, 2018, 6:51:03 PM7/31/18
to Qiime 1 Forum
Hello YB,

However, I hope to make a comparison between male's gut microbial community and female's gut microbial community  ... 
OK great!

by using relative abundance(%)
You can do that... but there are better ways to look for microbes that are differentially expressed between two groups. 

The main problem with relative abundance is that if one species becomes more abundant, it will make other species appear to be less abundant, even when they haven't changed at all. This picture shows the problem: 
Image result for balance trees qiime  

So if you look at the count values, you can see only one species changes (left panel). But if you look at the relative abundances (right panel), it looks like very species changed. Now imagine how complicated this would be if multiple species changed at the same time!

But don't worry, this Qiime script will help you find microbes that change in abundance and mitigate this issue:

I have found good results using the -a DESeq2_nbinom  option. Like this: 
differential_abundance.py -i otu_table.biom -o diff_otus.txt -m map.txt -a DESeq2_nbinom -c Treatment -x Control -y Fast -d


Let me know what you find!

Colin

YB

unread,
Aug 1, 2018, 6:24:26 AM8/1/18
to Qiime 1 Forum
Dear Colin

Thank you for your clear explanation.

I tried the "differential_abundance.py".
However, Qiime said "differential_abundance.py: command not found"

My Qiime is version 1.8.0 in Virtual Box.
The cause of that is old version?

Colin Brislawn

unread,
Aug 1, 2018, 11:38:16 AM8/1/18
to Qiime 1 Forum
Good morning,

Yes, differential_abundance.py is a script in Qiime 1.9.1, and you can download that newer VM here:

You could use the Qiime 1.9.1 VM and still keep your copy of the Qiime 1.8.0 VM at the same time.

Colin

P.S. This might be a good time to update to Qiime 2. There are lots of improvements within Qiime 2, and many more helpful people asking questions on the forums. https://qiime2.org/ 

YB

unread,
Aug 9, 2018, 9:11:16 PM8/9/18
to Qiime 1 Forum
Dear Colin

Thank you very much for giving me many useful advice.
The script "differential_abundance.py" was performed by using Qiime 1.9.1.


スクリーンショット 2018-08-10 9.59.15.png
Reply all
Reply to author
Forward
0 new messages