BSMAPz
BSMAPz copied to clipboard
methratio.py ERROR in conda and multicores of CPU: list index out of range
Hi, I write R codes by system(" conda run -n py27 python2 methratio.py -I -o ...") to use methratio.py to process rrbs bam files. I work in a node, which has 32 cores of cpus and 64 G memory. I revised the "samtools" command inside the original script by "conda run samtools ", and the runs failed with :
[methratio] @Fri Nov 24 15:29:11 2023 Processing 64 chromosomes at a time
[methratio] @Fri Nov 24 15:29:12 2023 Reading chr18_gl000207_random from batch1116/22T0007789.tmpSrt.bam with conda run samtools
......
[methratio] @Fri Nov 24 15:29:16 2023 Reading chr1 from batch1116/22T0007789.tmpSrt.bam with conda run samtools
Traceback (most recent call last):
File "methratio.py", line 590, in <module>
main()
File "methratio.py", line 138, in main
ret = chromPool.map(chromWorker, argList, chunksize=1)
File "/public3/home/scg9946/miniconda3/envs/py27/lib/python2.7/multiprocessing/pool.py", line 253, in map
return self.map_async(func, iterable, chunksize).get()
File "/public3/home/scg9946/miniconda3/envs/py27/lib/python2.7/multiprocessing/pool.py", line 572, in get
raise self._value
IndexError: list index out of range
[methratio] @Fri Nov 24 15:29:39 2023 Reading chrUn_gl000223 from batch1116/22T0007789.tmpSrt.bam with conda run samtools
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
However,the methratio script runs successfully using only one core of CPU.