snayfach / MAGpurify

Improvement of metagenome-assembled genomes
GNU General Public License v3.0
47 stars 12 forks source link

"lastal: can't open file: -P" When running "clade-markers" #14

Closed hqvuong closed 1 year ago

hqvuong commented 4 years ago

Hi I started the test workflow with MAGpurify but ran into an issue with the "clade-markers" step. I am using a conda environment with python 2.7 and MAGpurify installed. I successfully ran "phylo-markers" but I get this error when running "clade-markers". It looks like there are two "-P 1" flag and argument pairs confusing the command. There is output in its respective folder, but the clean bin results for display "clade-markers: no output file found". This is also my first issue I've reported, so I appreciate any feedback to help me help you identify the issue. Thank you for your help.

magpurify clade-markers example/test.fna example/output

After the command runs a little bit I get an error message:

Performing pairwise alignment of genes against MetaPhlan2 db of clade-specific genes

Error encountered executing: lastal -p BLOSUM62 -P 1 -f blasttab+ -m 10 MAGpurify-db-v1.0/clade-markers/markers.faa example/output/clade-markers/genes.faa -P 1 > example/output/clade-markers/genes.m8

Error message: lastal: can't open file: -P

hqvuong commented 4 years ago

fixed it by changing in "run_lastal" in utilities.py(github) or utility.py(conda_env)

moved "cmd += "-P %s " % threads" to the second line of commands and removed the first "-P 1"

def run_lastal(db_dir, out_dir, threads=1, seed_freq=10):
    cmd = "lastal -p BLOSUM62 -f blasttab+ "
    cmd += "-P %s " % threads
    cmd += "-m %s " % seed_freq
    cmd += "%s/clade-markers/markers.faa " % db_dir
    cmd += "%s/genes.faa " % out_dir
    cmd += "> %s/genes.m8 " % out_dir
    out, err = run_process(cmd)
Justan6 commented 1 year ago

I encountered the error below: Error encountered executing: lastal -p BLOSUM62 -P 1 -f blasttab+ -m 10 /home/nwezejus/MAGpurify-db-v1.0/clade-markers/markers.faa Magpurify_out/clade-markers/genes.faa -P 1 > Magpurify_out/clade-markers/genes.m8

Error message: b'/bin/sh: 1: lastal: not found\n'

snayfach commented 1 year ago

@Justan6 opening a separate issue for this

snayfach commented 1 year ago

@hqvuong I see this issue has been fixed in the code