SouthGreenPlatform / culebrONT

A snakemake pipeline to assembly, polishing, correction and quality check from Oxford nanopore reads.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in SystemExit

yi-tingho opened this issue · comments

Hi,

I am trying to run culebrONT for my Oxford Nanopore Technologies reads but I keep running into this error in the Snakefile:
expected str, bytes or os.PathLike object, not bool
SystemExitin line 21 of /home/hxxyit001/culebrONT/lib/python3.9/site-packages/culebrONT/snakefiles/Snakefile. File "/home/hxxyit001/culebrONT/lib/python3.9/site-packages/culebrONT/snakefiles/Snakefile", line 21, in <module> expected str, bytes or os.PathLike object, not bool

How do I debug this error?
Thanks in advance.

Hi can you send Log file please?

Ok the workflow crash because i think something is wrong on your file /scratch/hxxyit001/hins/hinsolens_config.yaml
Can you send your file please.
You install on Local mode I think, but you only mount home as binding and file is in scratch, please also make sure singularity can access to /scratch

I run an sbatch command to run my hins_run.sh file (attached as hins_run.txt) and attached is my .yaml file. I did add a cd function to allow it to access /scratch.
hins_run.txt
hinsolens_config.txt

Thanks,
I see the illumina key was remove, you must keep all key on yaml file but you can leave empty like ILLUMINA: ''
can you change your file /home/hxxyit001/culebrONT/lib/python3.9/site-packages/culebrONT/snakefiles/Snakefile line 12

# GLOBAL VARIABLES
version_CulebrONT = get_version()
try:
    culebront = CulebrONT(workflow, config)
    #pp(culebront)

except Exception as e:
    logger.logger.fatal(e, exc_info=False)
    logging.shutdown()
    raise SystemExit()

TO

# GLOBAL VARIABLES
version_CulebrONT = get_version()
culebront = CulebrONT(workflow, config)
pp(culebront)

The log capture is not full, I want to see where is error on your class CulebrONT

then run again job
you can also remove

  snakemake --nolock --use-singularity --singularity-args "--bind $HOME" \
    --cores -p -s /home/hxxyit001/culebrONT/lib/python3.9/site-packages/culebrONT/snakefiles/Snakefile \
    --latency-wait 6000000 --keep-going --restart-times 0 --rerun-incomplete --configfile /scratch/hxxyit001/hins/hinsolens_config.yaml

from your file hins_run.sh

I added the ILLUMINA: field back in and edited the lines you suggested. See the log file.
SystemExit error w traceback.txt

I think the error happened when path_value (Inside SnakeWrapper._check_dir_or_string) has a falsey value, so using an empty string or False would automatically throw that error

image

No the error is you activate PILON but for PILON you need illumina !!! (mandatory=["KAT", "PILON", "FLAGSTATS"])
please make pilon to false and run again.
sorry normally the error should be more explicit, I will look at the problem.

I deactivated PILON and it ran after including all parameters even those not activated. I did run into another issue error_jobrulegraph.txt. Here is my sh file
run_culebrONT_test.txt. I ran the snakemake command as it also showed that the directory is locked:

Error in rule rule_graph:
jobid: 19
output: /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/dag.png
log: /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/LOGS/GRAPH.o, /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/LOGS/GRAPH.e (check log file(s) for error message)
shell:

    (snakemake -s /home/hxxyit001/culebrONT/lib/python3.9/site-packages/culebrONT/snakefiles/Snakefile --use-singularity   --rulegraph --configfile /scratch/hxxyit001/test/culebrONT_OUTPUT/config_corrected.yaml > /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/dag.tmp
    dot -Tpng /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/dag.tmp > /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/dag.png) 1>/scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/LOGS/GRAPH.o 2>/scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/LOGS/GRAPH.e
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Logfile /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/LOGS/GRAPH.o:

Logfile /scratch/hxxyit001/test/culebrONT_OUTPUT/FINAL_REPORT/LOGS/GRAPH.e:
Building DAG of jobs...
Error: Directory cannot be locked. This usually means that another Snakemake instance is running on this directory. Another possibility is that a previous run exited unexpectedly.
/usr/bin/bash: line 2: dot: command not found

Please advise. Thanks in advance.

Hello, the output directory is locked by snakemake. see https://snakemake.readthedocs.io/en/stable/project_info/faq.html#how-does-snakemake-lock-the-working-directory to unlock
the second error is culebrONT need graphviz to build graph.