Zymo-Research / aladdin-shotgun

MIT License
0 stars 2 forks source link

Resistome SNPverify would run out of memory without retrying #110

Open zxl124 opened 6 months ago

zxl124 commented 6 months ago

In some samples Resistome SNPverify would run out of memory, and return with exit code 1. This results in pipeline not trying with more memory. Need a special errorstrategy for this process. Example error message:

28/04/2024 22:53:11 Error executing process > 'TAXPROFILER:AMRPLUSPLUS:RESISTOME_SNPVERIFY (Nano_06_IDT)'
28/04/2024 22:53:11 Caused by:
28/04/2024 22:53:11   Essential container in task exited - OutOfMemoryError: Container killed due to memory usage
28/04/2024 22:53:11 Command executed:
28/04/2024 22:53:11   # change name to stay consistent with count matrix name, but only if the names don't match
28/04/2024 22:53:11   if [ "Nano_06_IDT_alignment_sorted.bam" != "Nano_06_IDT.bam" ]; then
28/04/2024 22:53:11       mv Nano_06_IDT_alignment_sorted.bam Nano_06_IDT.bam
28/04/2024 22:53:11   fi
28/04/2024 22:53:11   
28/04/2024 22:53:11   SNP_Verification.py -c config.ini -t 8 -a true -i Nano_06_IDT.bam -o Nano_06_IDT.AMR_SNPs --count_matrix genes_rawcounts_AMR_analytic_matrix.csv
28/04/2024 22:53:11   
28/04/2024 22:53:11   cut -d ',' -f `awk -v RS=',' "/Nano_06_IDT/{print NR; exit}" Nano_06_IDT.AMR_SNPsgenes_rawcounts_AMR_analytic_matrix.csv` Nano_06_IDT.AMR_SNPsgenes_rawcounts_AMR_analytic_matrix.csv > Nano_06_IDT.AMR_SNP_count_col
28/04/2024 22:53:11   
28/04/2024 22:53:11   cut -d ',' -f 1 Nano_06_IDT.AMR_SNPsgenes_rawcounts_AMR_analytic_matrix.csv > gene_accession_labels
28/04/2024 22:53:11   
28/04/2024 22:53:11   paste gene_accession_labels Nano_06_IDT.AMR_SNP_count_col > Nano_06_IDT.SNP_confirmed_gene.tsv
28/04/2024 22:53:11 Command exit status:
28/04/2024 22:53:11   1
28/04/2024 22:53:11 Command output:
28/04/2024 22:53:11   (empty)
28/04/2024 22:53:11 Command error:
28/04/2024 22:53:11   Traceback (most recent call last):
28/04/2024 22:53:11     File "/opt/analysis/nextflow-bin/SNP_Verification.py", line 353, in <module>
28/04/2024 22:53:11       main()
28/04/2024 22:53:11     File "/opt/analysis/nextflow-bin/SNP_Verification.py", line 348, in main
28/04/2024 22:53:11       [gene_variant_dict.update(r) for r in results]
28/04/2024 22:53:11     File "/opt/analysis/nextflow-bin/SNP_Verification.py", line 348, in <listcomp>
28/04/2024 22:53:11       [gene_variant_dict.update(r) for r in results]
28/04/2024 22:53:11     File "/usr/local/lib/python3.8/concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
28/04/2024 22:53:11       for element in iterable:
28/04/2024 22:53:11     File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
28/04/2024 22:53:11       yield fs.pop().result()
28/04/2024 22:53:11     File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
28/04/2024 22:53:11       return self.__get_result()
28/04/2024 22:53:11     File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
28/04/2024 22:53:11       raise self._exception
28/04/2024 22:53:11   concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.