First-time qiime2 user with 1.9.1 qiime biom table ran into mafft error unsure if workflow is correct


I hope you guys are doing fine under the circumstances of the COVID19 emergency and thanks in advance for you time!

I think I am having trouble understanding the workflow of qiime and how it related to my specific project. My project consisted in taking gut samples (16S) from different individuals of the same species of sea urchin across different locations. I want to first know more about the taxonomic contents of the gut, including alpha, beta, phylogeny, and what ever other data I can squeeze out of it. Eventually once I acquire another data set (after sequencing) I want to add cytochrome B data from the individual sea urchins and correlate it with the data from the gut and metadata (location, etc.).

The data I received from the sequencing facility (16s) was generated by QIIME 1.9.1 :
sea urchin 16s qiime data folder

I have Qiime installed on a windows virtual box with the following specs:

The workflow I'm following is close to the Moving Pictures:

0. Unzip, Add meta data to BIOM Table (BIOMV210Format) generated by QIIME 1.9.1
( folder core-2762 in the data folder linked above)

biom add-metadata -i table_mc2762.biom -o seaurchintable.biom --observation-metadata-fp SeaUrchinMetadataQiime2.tsv

Output: seaurchintable.biom

1. Import BIOM Table into qiime2

qiime tools import
--input-path seaurchintable.biom
--type 'FeatureTable[Frequency]'
--input-format BIOMV210Format
--output-path seaurchinfeaturetable.qza

Output: seaurchinfeaturetable.qza

2. Import Phylogenetic Trees

qiime tools import
--input-path gg_13_8_otus/trees/97_otus.tree
--output-path unrooted-tree.qza
--type 'Phylogeny[Unrooted]'

Output: unrooted-tree.qza

3. Import Per-feature unaligned Sequence Data

qiime tools import
--input-path gg_13_8_otus/rep_set/97_otus.fasta
--output-path sequences.qza --type 'FeatureData[Sequence]'

4. Feature Table & Feature Data

qiime feature-table summarize
--i-table seaurchinfeaturetable.qza
--o-visualization seaurchinfeaturetable.qzv
--m-sample-metadata-file SeaUrchinMetadataQiime2.tsv


qiime feature-table tabulate-seqs
--i-data sequences.qza
--o-visualization sequences.qzv


5. Phylogenetic Diversity Tree

qiime phylogeny align-to-tree-mafft-fasttree
--i-sequences sequences.qza
--o-alignment aligned-rep-seqs.qza
--o-masked-alignment masked-aligned-rep-seqs.qza
--o-tree unrooted-tree.qza
--o-rooted-tree rooted-tree.qza

Output: Error

Command '['mafft', '--preservecase', '--inputorder', '--thread', '1', '/tmp/qiime2-archive-2voi5koo/1e445fb7-4cc7-45d7-a804-b160f18b1e32/data/dna-sequences.fasta']' returned non-zero exit status 1.

Log Error File

Upon searching the forum I came across these topics which may give me a possible way of tackling the problem. I want to make sure that I have the correct workflow up until now and make sure that i understand where I am going with this hence why i am writing this topic.

"mafft -> insufficient memory on the machine you are running this command on."
another insufficient memory error

or maybe that I have imported the files wrong...
hints that i can import as FeatureTable[Frequency] & FeatureData[Taxonomy]

or maybe
that i needed filtering the sequences...but i am unsure how to proceed with this and find the p-minus values according to the filtering tutorial.

Thanks in advance!
Also i used to run a discourse app back in the day you can add some pretty nice features like github integration etc. if you know how to do it without breaking it. let me know if you guys ever need any help.

1 Like

Hi @mercadocapote,

In step 2, you imported your phylogenetic tree, so you don’t need to build a new one with MAFTT. You may need to root the tree (check q2-phylogeny for that command), but just treat your imported tree as your tree going forward.


1 Like

Thank you so much for that clarification.

I succesfully rooted the tree using

qiime phylogeny midpoint-root
–i-tree unrooted-tree.qza
–o-rooted-tree rooted-tree.qza
–type ‘Phylogeny[Rooted]’

Then I followed the Moving Pictures Tutorial for the Diversity (Alpha and Beta) using:

qiime diversity core-metrics-phylogenetic
–i-phylogeny rooted-tree.qza
–i-table seaurchinfeaturetable.qza
–p-sampling-depth 2762
–m-metadata-file SeaUrchinMetadataQiime2.tsv
–output-dir core-metrics-results

and got the following error:

All non-root nodes in tree must have a branch length.

Full Error Below:

/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/sklearn/metrics/ DataConversionWarning: Data was converted to boolean for metric jaccard
warnings.warn(msg, DataConversionWarning)
/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/skbio/stats/ordination/ RuntimeWarning: The result contains negative eigenvalues. Please compare their magnitude with the magnitude of some of the largest positive eigenvalues. If the negative ones are smaller, it’s probably safe to ignore them, but if they are large in magnitude, the results won’t be useful. See the Notes section for more details. The smallest eigenvalue is -0.08427700423251835 and the largest is 2.2375944176580407.
Traceback (most recent call last):
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/”, line 328, in call
results = action(**arguments)
File “</home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/>”, line 2, in core_metrics_phylogenetic
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 245, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 484, in callable_executor
outputs = self._callable(scope.ctx, **view_args)
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_diversity/”, line 57, in core_metrics_phylogenetic
File “</home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/>”, line 2, in alpha_phylogenetic
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 245, in bound_callable
output_types, provenance)
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_diversity/_alpha/”, line 54, in alpha_phylogenetic
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/skbio/diversity/”, line 170, in alpha_diversity
counts, otu_ids, tree, validate, single_sample=False)
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/skbio/diversity/alpha/”, line 136, in _setup_faith_pd
_validate_otu_ids_and_tree(counts[0], otu_ids, tree)
File “/home/qiime2/miniconda/envs/qiime2-2020.2/lib/python3.6/site-packages/skbio/diversity/”, line 95, in _validate_otu_ids_and_tree
raise ValueError("All non-root nodes in tree must have a branch "
ValueError: All non-root nodes in tree must have a branch length.

1 Like

Hi @mercadocapote,

Check out this post, it looks like a similar error and possible solution.