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

211 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

Wang Bruce

unread,
Nov 26, 2025, 3:08:37 AMNov 26
to picrust-users
Hey Catherine:

Did you solve this issue? Was it truly related to WSL vs. Linux/Mac issue?

Thank you!

Robyn Wright

unread,
Nov 26, 2025, 8:36:12 AMNov 26
to picrus...@googlegroups.com
Hi all,

So sorry for the delay (and thanks for the new reply here and reminding me to respond!). @Catherine, apologies, what I should have asked was for you to run “conda list” - I got mixed up with the commands, but what I wanted to see was the versions of all of the packages in your environment. 

If you were able to access a different computer and get it to work that would be useful for me to know too, though.

Thanks,
Robyn

--
You received this message because you are subscribed to the Google Groups "picrust-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picrust-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picrust-users/60b4c3e3-4134-4ea3-8887-29f835fec8c0n%40googlegroups.com.

Catherine J Pettinger

unread,
Nov 26, 2025, 10:39:25 AMNov 26
to picrus...@googlegroups.com
Hi all!

We did resolve the issue for my work (with the help of my department's bioinformatician)---- the issue is with using WSL it seems. Something about access to the Window's tmp file not working from a subsytem, needing to install sepp from source, and the WSL generally crashing when asked to do too much so sometimes needing to restart it. I can check with the bioinformatician if she is OK with me sharing some of the steps to get it to work, but I ended up using a couple other options at the end of the day.

It was simpler for my workflow to either run it from a Mac (I can borrow one from my university's library) or on my university's high-throughput-computing resource through some specific container options the bioinformatician helped me set-up that I can access through WSL, but it doesn't run on WSL. Hopefully you all can find an option that works, or find a different method for Windows users.

Best,
Catherine

From: picrus...@googlegroups.com <picrus...@googlegroups.com> on behalf of Robyn Wright <roby...@gmail.com>
Sent: Wednesday, November 26, 2025 7:36 AM
To: picrus...@googlegroups.com <picrus...@googlegroups.com>
Subject: Re: [picrust-users] Re: Error in picrust2_pipeline.py command, possibly related to EPA-NG.
 
You received this message because you are subscribed to a topic in the Google Groups "picrust-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picrust-users/6UJ0v0DDARA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picrust-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/picrust-users/AS1P251MB07015551A6851A226BBB5ED5F8DEA%40AS1P251MB0701.EURP251.PROD.OUTLOOK.COM.

Skyler Oliver

unread,
Dec 3, 2025, 2:33:24 PM (13 days ago) Dec 3
to picrust-users
Hi everyone,

I've been following along with this problem for a little while and did a little digging for a workaround to get this to run locally on a WSL2. I know we have moved to github, but since there isn't an open discussion on that side yet (and for the sake of a potential solution for those who run into this future problem) I'll post the solution that worked for me.

The WSL is indeed the issue. In almost every case, q2-picrust is failing at the placement step. EPA-NG often just dies with no explicit error, but with SEPP we get a "pplacer exit code 11" error, which is a known SEPP issue where pplacer is handling a legacy "vsyscall" mechanism that crashes on newer kernels. The good news is its easily fixable and actually already documented on the qiime2 forum page! 
The TLDR for this is you just the need to enable a vsyscall emulator. I've not tracked down a fix for EPA-NG, as my machine caps out at 16GB and thats usually the floor for that placement tool, but for SEPP the following steps have allowed myself and others to run in a WSL terminal:

1. Adding a vsyscall=emulate to WSL kernel
In the home directory of the system (C:\Users\Your name), create or modify a file ".wslconfig" and add the following (X being placeholders for your machine specs):

[wsl2]
memory=XXGB
processors=X
swap=XGB
kernelCommandLine=vsyscall=emulate

Its important here to shutdown your powershell or CMD with "wsl --shutdown" after this so they'll pick on the config when you reopen. You can confirm the kernal has gotten the flag by looking into your /proc/cmdline. If you see "vsyscall=emulate" somewhere in the line, youre good to continue.

2. Checking your linux system
I personally use Ubuntu, looking for "\wsl.localhost\Ubuntu\proc\config.gz" . I reccomend making a backup of this file and saving it to your desktop or something in case something goes awry. 
Look for "CONFIG_LEGACY_VSYS_NONE" and change it to =y (if already =y, you're good).

After these steps, I've been succesful in running both the tutorial sample set as well as a test sample set on my own machine. Hopefully y'all find it helpful!
Reply all
Reply to author
Forward
0 new messages