Error in picrust2_pipeline.py command, possibly related to EPA-NG.

159 views
Skip to first unread message

Kirin_C

unread,
May 14, 2025, 7:49:08 AMMay 14
to picrust-users
Hello all!

I encountered the following problem when using the picrust2_pipeline.py command of PICRUSt2. Can anyone help me take a look:
picrust2_pipeline.py \
  -s dna-sequences.fasta \
  -i feature-table.biom \
  -o picrust2_out \
  -p 4

Error running this command:
place_seqs.py --study_fasta dna-sequences.fasta --ref_dir /home/ubuntu_user/miniconda3/envs/fresh-picrust2/lib/python3.8/site-packages/picrust2/default_files/prokaryotic/pro_ref --out_tree picrust2_out/out.tre --processes 1 --intermediate picrust2_out/intermediate/place_seqs --min_align 0.8 --chunk_size 5000 --placement_tool epa-ng

Standard error of the above failed command:

Error running this command:
epa-ng --tree /home/ubuntu_user/miniconda3/envs/fresh-picrust2/lib/python3.8/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre --ref-msa picrust2_out/intermediate/place_seqs/ref_seqs_hmmalign.fasta --query picrust2_out/intermediate/place_seqs/study_seqs_hmmalign.fasta --chunk-size 5000 -T 1 -m /home/ubuntu_user/miniconda3/envs/fresh-picrust2/lib/python3.8/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.model -w picrust2_out/intermediate/place_seqs/epa_out --filter-acc-lwr 0.99 --filter-max 100

Standard output of the above failed command:
INFO Selected: Output dir: picrust2_out/intermediate/place_seqs/epa_out/
INFO Selected: Query file: picrust2_out/intermediate/place_seqs/study_seqs_hmmalign.fasta
INFO Selected: Tree file: /home/ubuntu_user/miniconda3/envs/fresh-picrust2/lib/python3.8/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.tre
INFO Selected: Reference MSA: picrust2_out/intermediate/place_seqs/ref_seqs_hmmalign.fasta
INFO Selected: Filtering by accumulated threshold: 0.99
INFO Selected: Maximum number of placements per query: 100
INFO Selected: Automatic switching of use of per rate scalers
INFO Selected: Preserving the root of the input tree
INFO Selected: Specified model file: /home/ubuntu_user/miniconda3/envs/fresh-picrust2/lib/python3.8/site-packages/picrust2/default_files/prokaryotic/pro_ref/pro_ref.model
INFO Selected: Reading queries in chunks of: 5000
INFO Selected: Using threads: 1
INFO     ______ ____   ___           _   __ ______
        / ____// __ \ /   |         / | / // ____/
       / __/  / /_/ // /| | ______ /  |/ // / __
      / /___ / ____// ___ |/_____// /|  // /_/ /
     /_____//_/    /_/  |_|      /_/ |_/ \____/ (v0.3.8)
INFO Using model parameters:
INFO    Rate heterogeneity: GAMMA (4 cats, mean),  alpha: 0.453141 (user),  weights&rates: (0.25,0.0250674) (0.25,0.220229) (0.25,0.782933) (0.25,2.97177)
        Base frequencies (user): 0.229585 0.22008 0.298596 0.251739
        Substitution rates (user): 1.00319 2.79077 1.5301 0.87441 3.83966 1
INFO Output file: picrust2_out/intermediate/place_seqs/epa_out/epa_result.jplace


The picrust2_out folder outputted also only contains 'intermediate'.

Robyn Wright

unread,
May 15, 2025, 10:24:50 AMMay 15
to picrust-users
Hi there,

Was that the entire output? And do you have the output file from epa-ng there? Could you send some more information about the system that you're using, and also see if maybe running each of the steps separately works, or helps to narrow down what the issue might be? It looks like you're using the older verson of PICRUSt2, so that would be the instructions here.

Best wishes,
Robyn

Simona Polizzi

unread,
Jul 7, 2025, 11:34:15 AMJul 7
to picrust-users
Hi! I had the same problem while running the entire pipeline and even with the place-seqs.py one. I'm sure I'm using the current release of picrust2. Did you find any solution? Thank you!

Simona Polizzi

unread,
Jul 7, 2025, 11:34:15 AMJul 7
to picrust-users
Hi, I had the same issue but I'm sure I'm using the current version of picrust2 and the same error occurs while using test ASVs (so the problem is not about the sequences i'm using), have you found the solution??


Il giorno giovedì 15 maggio 2025 alle 16:24:50 UTC+2 roby...@gmail.com ha scritto:

Robyn Wright

unread,
Jul 7, 2025, 1:11:01 PMJul 7
to picrust-users
Hi there,

As I mentioned above, could you try running the steps separately, as detailed here? And then please send the epa-ng output. 

Thanks,
Robyn

Huy Nguyen

unread,
Aug 6, 2025, 12:54:30 PMAug 6
to picrust-users
Hi Robyn, I have the same issue when I ran Picrust2 on the example dataset. I tried to run steps separately as well but it also returned similar error. The log of epa-ng output from my run is (from epa_info.log)

INFO Selected: Output dir: placement_working_bac/epa_out/
INFO Selected: Query file: placement_working_bac/study_seqs_hmmalign.fasta
INFO Selected: Tree file: /mnt/c/Users/h.nguyen/Documents/Data/MiSeq35/picrust2_github/picrust2-2.6.2/picrust2/default_files/bacteria/bac_ref/bac_ref.tre
INFO Selected: Reference MSA: placement_working_bac/ref_seqs_hmmalign.fasta

INFO Selected: Filtering by accumulated threshold: 0.99
INFO Selected: Maximum number of placements per query: 100
INFO Selected: Automatic switching of use of per rate scalers
INFO Selected: Preserving the root of the input tree
INFO Selected: Specified model file: /mnt/c/Users/h.nguyen/Documents/Data/MiSeq35/picrust2_github/picrust2-2.6.2/picrust2/default_files/bacteria/bac_ref/bac_ref.model

INFO Selected: Reading queries in chunks of: 5000
INFO Selected: Using threads: 1
INFO     ______ ____   ___           _   __ ______
        / ____// __ \ /   |         / | / // ____/
       / __/  / /_/ // /| | ______ /  |/ // / __  
      / /___ / ____// ___ |/_____// /|  // /_/ /  
     /_____//_/    /_/  |_|      /_/ |_/ \____/ (v0.3.8)
INFO Using model parameters:
INFO    Rate heterogeneity: GAMMA (4 cats, mean),  alpha: 0.408013 (user),  weights&rates: (0.25,0.0178872) (0.25,0.187716) (0.25,0.739808) (0.25,3.05459)
        Base frequencies (user): 0.209289 0.232667 0.311531 0.246513
        Substitution rates (user): 1.04872 2.92815 1.63887 0.831209 3.68952 1
INFO Output file: placement_working_bac/epa_out/epa_result.jplace

I first tried on my own data set but it failed, so I ran on the example dataset, but it also failed with similar error at this step (running place_seqs.py, and error in epa)
Any suggestion on what I can do?

I am running on picrust2 on WSL on Windows 11.
Best,

Robyn Wright

unread,
Oct 2, 2025, 1:45:27 PMOct 2
to picrust-users
Hi there,

Apologies for my very slow reply. How much memory do you have on this machine? Could you try running with a smaller chunk size (in the place_seqs.py command)? If this doesn't work, please send your full output including the commands you are trying to run using the example data in a text file and I will try to take a look.

Thanks,
Robyn

Catherine Pettinger

unread,
Oct 27, 2025, 1:15:07 PMOct 27
to picrust-users
Hi,
I seem to be getting a similar issue, where test_place_seqs.py fails when run through pytest, with the full workflow pipeline, and in the first step of the individual runs (as described on https://github.com/picrust/picrust2/wiki/Workflow) .
I first tried the workflow within the qiime2 plug-in, then tried with PICRUSt2-v2.6.2 (doing an install-from-source per  https://github.com/picrust/picrust2/wiki/Installation#install-from-source). 

I trialed this on two computers, one a Windows desktop (Windows 10, 32.0 GB RAM, 64-bit OS, x64-based processor) and on my laptop (Windows 11, 12.0 GB RAM, 64-bit OS, x64-based processor). Both using a windows-subsystem- for- linux (WSL). Both computers had the same issue.

Attached is the inputs I performed in Terminal along with the outputs. Let me know if any other information is needed or if you have any suggestions :)

Thanks,
Catherine 

script_qiime2_RVT_picrust2laptop.txt

Robyn Wright

unread,
Oct 27, 2025, 2:17:57 PMOct 27
to picrust-users
Hi Catherine,

Thanks for the detail! I will try to run through this on a Windows machine at some point to see if I can replicate it/troubleshoot, but as I don't have one myself (I have a Mac and our server is Linux), I don't know when this will be. 

In the meantime, could you try running the final (from your terminal output) place_seqs.py command with the --chunk_size set to, say, 500? If you could also send the information from running "conda info" in another text file then that might be useful, too. 

Thanks,
Robyn

Catherine Pettinger

unread,
Oct 27, 2025, 4:38:03 PMOct 27
to picrust-users
Thanks Robyn!

I tried setting the chunk_size and still received an error. The exact command input/output is in the attached file along with the conda info.

Let me know your thoughts. I can also probably try and use a Mac if you think this is a WSL/Windows vs. Linux/Mac issue. Just would need to check around lab for when I can get computer time on one.

Best, 
Catherine 

conda-info.txt
Reply all
Reply to author
Forward
0 new messages