Q2 picrust2 Tutorial Plugin error from fragment-insertion

I am doing a q2 picrust2 Tutorial (https://github.com/picrust/picrust2/wiki/q2-picrust2-Tutorial)
All the install and download steps worked well except fragment-insertion step using:
qiime fragment-insertion sepp --i-representative-sequences mammal_seqs.qza
–p-threads 1 --i-reference-alignment reference.fna.qza
–i-reference-phylogeny reference.tre.qza
–output-dir tutorial_placed_out
The error is:
Plugin error from fragment-insertion:
Command ‘[‘run-sepp.sh’, ‘/tmp/qiime2-archive-pmh381na/38a5d748-739e-44d1-b547-a35c0c8b8f29/data/dna-sequences.fasta’, ‘q2-fragment-insertion’, ‘-x’, ‘1’, ‘-A’, ‘1000’, ‘-P’, ‘5000’, ‘-a’, ‘/tmp/qiime2-archive-yyddx_7u/87909524-fa4f-4b28-abd6-c7c89a3c7da7/data/aligned-dna-sequences.fasta’, ‘-t’, ‘/tmp/qiime2-archive-3jm7iibt/f4e69728-a745-4069-b432-3f14951089fd/data/tree.nwk’]’ returned non-zero exit status 1

Debug info has been saved to /tmp/qiime2-q2cli-err-cby4nvz1.log

From the tutorial referenced:

Note that you need to place your ASVs into the PICRUSt2 reference files - if you place your ASVs into the default SEPP reference files you will get downstream errors. The two reference files used here are the same ones you would use with your own data .

Can you confirm you are using the picrust2 reference files?

Thank you, this might be the problem. Could you please explain a little bit detail. I am not sure how to put ASVs into the PICRUSt2 reference files, which directory should I place the ASVs? I am completely new, I just follow the tutorial, those 5 files ( mammal_biom.qza,mammal_seqs.qza, mammal_metadata.tsv, reference.fna.qza, reference.tre.qza) were placed into q2-picrust2_test folder.

According to the tutorial, It looks that “qiime fragment-insertion sepp” is trying to place the ASV into PICRUSt2 reference files. And I got an error here.

The tutorial contains two reference files that need to be downloaded and used with fragment insertion. Did you download those? If so, are those the files indicated in your command above?

Yes, I think I followed the tutorial line by line:

  1. I download those 3 file by:
    mkdir q2-picrust2_test
    cd q2-picrust2_test
    wget http://kronos.pharmacology.dal.ca/public_files/tutorial_datasets/picrust2_tutorial_files/mammal_biom.qza
    wget http://kronos.pharmacology.dal.ca/public_files/tutorial_datasets/picrust2_tutorial_files/mammal_seqs.qza
    wget http://kronos.pharmacology.dal.ca/public_files/tutorial_datasets/picrust2_tutorial_files/mammal_metadata.tsv

  2. Then I download another two file by:
    wget http://kronos.pharmacology.dal.ca/public_files/tutorial_datasets/picrust2_tutorial_files/reference.fna.qza
    wget http://kronos.pharmacology.dal.ca/public_files/tutorial_datasets/picrust2_tutorial_files/reference.tre.qza

All these five files were successfully downloaded into q2-picrust2_test folder, which is created at the beginning.

  1. I run the q2-fragmentation insertion by:
    qiime fragment-insertion sepp --i-representative-sequences mammal_seqs.qza
    –p-threads 1 --i-reference-alignment reference.fna.qza
    –i-reference-phylogeny reference.tre.qza
    –output-dir tutorial_placed_out

Then the error occurs here:

Plugin error from fragment-insertion:
Command ‘[‘run-sepp.sh’, ‘/tmp/qiime2-archive-pmh381na/38a5d748-739e-44d1-b547-a35c0c8b8f29/data/dna-sequences.fasta’, ‘q2-fragment-insertion’, ‘-x’, ‘1’, ‘-A’, ‘1000’, ‘-P’, ‘5000’, ‘-a’, ‘/tmp/qiime2-archive-yyddx_7u/87909524-fa4f-4b28-abd6-c7c89a3c7da7/data/aligned-dna-sequences.fasta’, ‘-t’, ‘/tmp/qiime2-archive-3jm7iibt/f4e69728-a745-4069-b432-3f14951089fd/data/tree.nwk’]’ returned non-zero exit status 1

Debug info has been saved to /tmp/qiime2-q2cli-err-cby4nvz1.log

Hi there @dong!

Can you run the following commands and provide the results here?

qiime tools peek mammal_seqs.qza
qiime tools peek reference.fna.qza
qiime tools peek reference.tre.qza

For example, here is what I see when I run that…

$ qiime tools peek mammal_seqs.qza
UUID:        38a5d748-739e-44d1-b547-a35c0c8b8f29
Type:        FeatureData[Sequence]
Data format: DNASequencesDirectoryFormat

$ qiime tools peek reference.fna.qza
UUID:        87909524-fa4f-4b28-abd6-c7c89a3c7da7
Type:        FeatureData[AlignedSequence]
Data format: AlignedDNASequencesDirectoryFormat

$ qiime tools peek reference.tre.qza
UUID:        f4e69728-a745-4069-b432-3f14951089fd
Type:        Phylogeny[Rooted]
Data format: NewickDirectoryFormat

Hi thanks:

I re-downloaded those files and BTW I have updated qiime to 2019.1 but the same error there.
And my results are exactly the same as yours:

(/home/dy83/project/conda_envs/qiime2-2019.1) [dy83@ruddle2 q2-picrust2_test]$ qiime tools peek mammal_seqs.qza
UUID:        38a5d748-739e-44d1-b547-a35c0c8b8f29
Type:        FeatureData[Sequence]
Data format: DNASequencesDirectoryFormat
(/home/dy83/project/conda_envs/qiime2-2019.1) [dy83@ruddle2 q2-picrust2_test]$ qiime tools peek reference.fna.qza
UUID:        87909524-fa4f-4b28-abd6-c7c89a3c7da7
Type:        FeatureData[AlignedSequence]
Data format: AlignedDNASequencesDirectoryFormat
(/home/dy83/project/conda_envs/qiime2-2019.1) [dy83@ruddle2 q2-picrust2_test]$ qiime tools peek reference.tre.qza
UUID:        f4e69728-a745-4069-b432-3f14951089fd
Type:        Phylogeny[Rooted]
Data format: NewickDirectoryFormat

Does this file still exist? If so, can you attach it? If not, can you re-run and attach the new log file created? I suspect you are running out of computational resources, and that the error message is non-informative. Can you tell me a bit about your computational environment?

Great, thanks a lot! You are right, I run out of the computational resources. The problem is now solved by giving more computational resources to run.

Hello, @thermokarst and @dong. Thank you for this discussion.
I have the same problem but am struggling to get out of it.
Could you please guide me on how to add computational resources to run this command

Its alright. I finally managed to figure it out.
Thank you ounce again. It would have been much more
difficult without this discussion

1 Like

Hello, @dong and @thermokarst @Andrew_Bugz. Thank you for this discussion. I also have the same problem but didn’t solve it. Could you please guide me on how to give more computational resources to run. I am completely freshman. I use qiime2-2019.1 on mac.

The error is:
qiime fragment-insertion sepp --i-representative-sequences mammal_seqs.qza
–p-threads 1 --i-reference-alignment reference.fna.qza
–i-reference-phylogeny reference.tre.qza
–output-dir tutorial_placed_out
Plugin error from fragment-insertion:
Command ‘[‘run-sepp.sh’, ‘/var/folders/d1/120ktkcn17x9vsxvtwxdsd2r0000gn/T/qiime2-archive-2t2d51lc/38a5d748-739e-44d1-b547-a35c0c8b8f29/data/dna-sequences.fasta’, ‘q2-fragment-insertion’, ‘-x’, ‘1’, ‘-A’, ‘1000’, ‘-P’, ‘5000’, ‘-a’, ‘/var/folders/d1/120ktkcn17x9vsxvtwxdsd2r0000gn/T/qiime2-archive-fp3eiu12/87909524-fa4f-4b28-abd6-c7c89a3c7da7/data/aligned-dna-sequences.fasta’, ‘-t’, ‘/var/folders/d1/120ktkcn17x9vsxvtwxdsd2r0000gn/T/qiime2-archive-znmjm8s3/f4e69728-a745-4069-b432-3f14951089fd/data/tree.nwk’]’ returned non-zero exit status 1.
Debug info has been saved to /var/folders/d1/120ktkcn17x9vsxvtwxdsd2r0000gn/T/qiime2-q2cli-err-tz7s042i.log

Hello @JIANJIAN_HOU.
Sorry for the late response. Hopefully, you found a solution already. In any case, I’ll share what I did.
I have mine installed using a virtual box, not on a mac. What I did was to get to the system settings and increased the base memory. You can increase it from the recommended 1024 MB to as much as your dataset might require (in my case, I could increase up to about 8GB).
I hope this helps.

1 Like

Hi @Andrew_Bugz, thank you very much.
I use the native qiime2-2019.1 on my mac. The memory is 8 GB of RAM. I am sorry, now I also not solved this error in qiime2-picrust2.
But I installed picrust2 with conda and it can successfully work on my computer. I have already analysed my data by this way.