a-h-b / dadasnake

Amplicon sequencing workflow heavily using DADA2 and implemented in snakemake
GNU General Public License v3.0
45 stars 17 forks source link

Error in rule picrust2 #37

Closed bheimbu closed 1 year ago

bheimbu commented 1 year ago

hI @a-h-b,

I have tried ./dadasnake -c -n "TESTRUN" -r config/config.test.yaml and get following error:

Error in rule picrust2:
    jobid: 70
    input: post/filtered.seqTab.biom, post/filtered.seqs.fasta
    output: post/picrust2_output
    log: logs/picrust2.log (check log file(s) for error message)
    conda-env: /usr/users/bheimbu/bin/Huizhen/dadasnake/conda/9ea92eb48e6067ce75da7c42ebece00a_
    shell:

        if grep --quiet OTU_ post/filtered.seqs.fasta; then
           echo "replacing OTU with ASV in seqs" > logs/picrust2.log
           TMPD=$(mktemp -d -t --tmpdir=/home/uni08/bheimbu/bin/Huizhen/dadasnake/test_output/tmp "XXXXXX")
           SEQS=$TMPD/seqs.fa
           sed 's#OTU_#ASV_#g' post/filtered.seqs.fasta > $SEQS
        else
           SEQS=post/filtered.seqs.fasta
        fi
        picrust2_pipeline.py -s $SEQS -i post/filtered.seqTab.biom -o post/picrust2_output -p 12          --stratified --per_sequence_contrib  --max_nsti 2              --min_reads 1          --min_samples 1  -t epa-ng          --in_traits EC,KO               -e 0.5 -m mp          --min_align 0 &>> logs/picrust2.log

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
    cluster_jobid: Submitted batch job 16597700

My version of snakemake is 7.18.2, installed locally.

Cheers Bastian

bheimbu commented 1 year ago

Found the solution by myself: There were a couple of dependeny problems between numpy, h5py, and picrust2. In order to solve this, I did following:

mamba create -n picrust2 -c bioconda -c conda-forge picrust2=2.4.1
mamba activate picrust2
mamba env export > picrust2_env.yml
mv picrust2_env.yml dadasnake/workflow/envs/picrust2_env.yml
./dadasnake -i config/config.init.yaml 

This changes the picrust2_env.yml file into a running version.

a-h-b commented 1 year ago

Hey, thanks for letting us know. Your picrust2 version seems to be older than the one we have usually. Keep in touch in case of problems. :-) ahb

bheimbu commented 1 year ago

But this version number works properly at least :relieved: Because when I tried to install picrust2 with mamba create -n picrust2 picrust2 it also didn't work out. I had to use the version specified on the picrust2 website.