Vini2 / phables

🫧🧬 From fragmented assemblies to high-quality bacteriophage genomes
https://phables.readthedocs.io/
MIT License
74 stars 6 forks source link

[BUG] MissingOutputException in rule koverage #46

Closed ivelsko closed 6 months ago

ivelsko commented 6 months ago

Hi Vini2, thanks for this great tool! I've run it on a bunch of samples and it completed successfully on all but 1, where I got this error. Does it mean that no phage genomes were found in this sample?

Describe the bug Snakemake failes because of a MissingOutputException in rule koverage

To Reproduce Steps to reproduce the behaviour, including the

  1. Command executed
phables run --input modern_calc_mags_input/ERS3774487-assembly_graph.gfa \
         --reads tmp/ERS3774487/fastqs \
         --output ERS3774487_out/phables \
         --conda-prefix /path_to/phables/conda  \
         --threads 8 \
         phables
  1. Error message
    Snakemake finished successfully
    Waiting at most 5 seconds for missing files.
    MissingOutputException in rule koverage in file /r1/user_name/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/rules/coverage.smk, line 17:
    Job 3  completed successfully, but some output files are missing. Missing files after 5 seconds. This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait:
    ERS3774487_out/phables/temp/ERS3774487.bam
    ERS3774487_out/phables/temp/ERS3774487.bam.bai
    Removing output files of failed job koverage since they might be corrupted:
    ERS3774487_out/phables/results/sample_coverm_coverage.tsv
    Shutting down, this might take some time.
    Exiting because a job execution failed. Look above for error message

Desktop (please complete the following information):

Thank you for your help! Irina

Vini2 commented 6 months ago

Hi @ivelsko

Thanks for your interest in Phables.

Looks like koverage did not generate the BAM files. Can you please share with me the log file generated when this step failed? I can take a look and get back to you.

Also, can you tell me the version of koverage you are using?

Thanks, Vijini

ivelsko commented 6 months ago

Hi Vijini,

Here's the log file from the run. I'm not able to find a version for koverage though. When I activate the conda environment and run which koverage I get nothing returned, and when i just run koverage I get koverage: command not found. Can you let me know where to find the version?

I looked for the bam files in the output folder as well as the working folder, in case they were produced and the wait time was too short, but I can't find them.

snakejob.phables.1.sh.e1215419.txt

Thanks, Irina

Vini2 commented 6 months ago

Hi Irina,

I'm still not sure what is going on and why the BAM files are not getting created. Can you please share with me this file? ERS3774487_out/phables/koverage.log

Thanks, Vijini

ivelsko commented 6 months ago

Hi Vijini,

here's the koverage.log file. It says both jobs finished successfully and there are no errors.

koverage.log

Thanks, Irina

Vini2 commented 6 months ago

Hey @beardymcjohnface,

Can you spot what's going on with koverage in this issue? Appreciate any help.

Thanks!

beardymcjohnface commented 6 months ago

Can you please delete the intermediate file ERS3774487_out/phables/temp/ERS3774487.cov and rerun?

The problem is that the BAMs are a final target output for Phables but not for Koverage. I'll push an update to Koverage that fixes the issue.

ivelsko commented 6 months ago

I deleted that file and ran it again, and it completed successfully. Thanks!

Vini2 commented 6 months ago

Hey @beardymcjohnface! Thanks for clarifying this issue.

@ivelsko I hope everything runs smoothly now. I'll close this issue now.

Please let me know if you come across any further issues.

Thanks!