functional-dark-side / agnostos-wf

43 stars 15 forks source link

Running AGNOSTOS db_update on cluster without SLURM capability #10

Open mhyleung opened 2 years ago

mhyleung commented 2 years ago

Dear all

I appear to have managed to set up Agnostos properly, but it appears that the cluster that I am using does not support SLURM. I was advised to run the command without the SLURM bit:

cd db_update/
snakemake -s Snakefile --use-conda -j 100 --cluster-config config/cluster.yaml -R --until workflow_report

So it appeared to be running until I hit the following error on the log file:

Error in rule spurious_shadow:
    jobid: 14
    output: /my_path/agnostos-wf/db_update/spurious_shadow/spurious_shadow_info.tsv
    log: logs/spsh_stdout.log, logs/spsh_stderr.err (check log file(s) for error message)
    conda-env: /my_path/agnostos-wf/db_update/.snakemake/conda/e79cd1b5
    shell:

        set -x
        set -e

        export OMPI_MCA_btl=^openib
        export OMP_NUM_THREADS=16
        export OMP_PROC_BIND=FALSE

        # 1. Detection of spurious ORFs

        NANTI=$(grep -c '^NAME' /my_path/agnostos-wf/databases/AntiFam.hmm)
        NSEQS=$(grep -c '^>' /my_path/agnostos-wf/db_update/gene_prediction/orf_seqs.fasta)
        N=$(($NSEQS * $NANTI))

        # Run hmmsearch (MPI mode)
        srun --mpi=pmi2 /my_path/agnostos-wf/agnostos-wf/bin/hmmsearch --mpi --cut_ga -Z "${N}" --domtblout /my_path/agnostos-wf/db_update/spurious_shadow/hmmsearch_antifam_sp.out -o /my_path/agnostos-wf/db_update/spurious_shadow/hmmsearch_antifam_sp.log /my_path/agnostos-wf/databases/AntiFam.hmm /my_path/agnostos-wf/db_update/gene_prediction/orf_seqs.fasta 2>logs/spsh_stderr.err 1>logs/spsh_stdout.log

The corresponding ogs/spsh_stdout.log file indicates that srun is not found (as expected). I figured the way to let this run without SLURM would be to remove the srun commands on all AGNOSTOS commands, which might be a daunting task. However, I can't seem to find the file in which all these commands for the snakemake workflow is laid out.

I am not overly familiar with snakemake so if anyone can lend me a hand that would be great.

Better yet, if there is a currently-functioning alternative to running agnostos without SLURM that would also be awesome!

Thanks

Marcus

ChiaraVanni commented 2 years ago

Hi Marcus, you can try to change the MPI runner variable, which is set in the config.yaml file:

# MPI runner (de.NBI cloud, SLURM)
mpi_runner: "srun --mpi=pmi2"

Let us know if it works!

Chiara

mhyleung commented 2 years ago

Hi Chiara thanks for the help as always. So in this case should I just remove srun --mpi=pmi2 , and leave it blank if I do not have srun?

Marcus

genomewalker commented 2 years ago

@mhyleung, which queue do you use at your HPC? PBS? LSF? You cannot run AGNOSTOS without a queue system at the moment.

mhyleung commented 2 years ago

Hi sorry for the late response. I am considering running my tasks in AWS' ParallelCluster which supports SLURM. I just need a lot of time to get this set up as I am relatively new to AWS. Thanks for the assistance.