HadrienG / InSilicoSeq

:rocket: A sequencing simulator
https://insilicoseq.readthedocs.io
MIT License
177 stars 32 forks source link

iss generate crashes when removing temporary files after execution #143

Closed jdwinkler-lanzatech closed 4 years ago

jdwinkler-lanzatech commented 4 years ago

Hi,

Thanks for developing this tool, it is quite useful. At the moment, I am having trouble with using iss with draft genomes; after generation of the synthetic reads and concatenation of the resulting fastq files into a single read pair, it looks like the the clean up function is trying to remove temporary fastq files that have already been deleted.

Upon examination, it looks like the R1 reads are being removed twice, and the try/except clause in the util.py/generate function exits upon the FileNotFoundException being raised by the os.remove call. I'm not exactly sure why this is happening. Any thoughts?

For the moment, I can work around this, but I imagine you could add an os.path.exists call before attempting to remove the files to avoid this scenario in the meantime.

Some log information:

INFO:iss.util:Cleaning up ERROR:iss.util:Could not read temporary file: iss_synthetic_reads_10.iss.tmp.contig0.0_R1.fastq

HadrienG commented 4 years ago

Hi!

Thanks for your bug report. I can't reproduce the error on my machine. Could you give me:

Best, /Hadrien

jdwinkler-lanzatech commented 4 years ago

Sorry for the delayed reply-let me try to get this together this week. Unfortunately it seems like an intermittent error?

HadrienG commented 4 years ago

Feel free to comment on this if it still happens, but so far I could not reproduce the bug so I'm closing this for now.

jdwinkler-lanzatech commented 4 years ago

Apologies, I eventually figured out that the OOM killer was terminating some of the read generating processes, which lead to unexplained failures at the read compression stage (since some of the expected files were missing, I think).