cancerit / telomerecat

Telomerecat: The telomere computational analysis tool
GNU General Public License v3.0
20 stars 5 forks source link

unexpected error #12

Closed xtmgah closed 3 years ago

xtmgah commented 4 years ago

Hello:

I tried run telomerecat with 16 cpu and found there are some issues in the logs as bellow. Can you let me know how to fix it? Thanks.

--------------------------------------------------------------------------------
telomerecat bam2length has started. Start Time: 2020-04-30 14:06:13
-------------------------------------------------------------------

 Generating TELBAM from: /lscratch/57163149/NSLC-0113-T01/NSLC-0113-T01.bam
    - TELBAM generation started 2020-04-30 14:06:13
I feel there's a line somewhere in the code, if we correct it we don't need to do this. Why input path is not bytes again?
    * | Time: 124 
6       + | Time: 244 
 246    - | Time: 363 
me: 365 + | Time: 483 
 Time: 4+ | Time: 602 
* | Time- | Time: 722 
    + | Time: 840 
42      * | Time: 959 
: 961   * | Time: 1075 
 | Time:* | Time: 1186 
188     * | Time: 1300 
 Time: 1+ | Time: 1411 
3       + | Time: 1525 
ime: 152- | Time: 1638 
    - | Time: 1750 
e: 1752 + | Time: 1863 
    + | Time: 1975 
 1977   * | Time: 2088 
 | Time:* | Time: 2200 
202     * | Time: 2313 
 Time: 2+ | Time: 2425 
7       + | Time: 2538 
ime: 254- | Time: 2652 
    - | Time: 2763 
e: 2765 + | Time: 2877 
    + | Time: 2988 
 2990   * | Time: 3102 
 | Time:* | Time: 3213 
215     * | Time: 3327 
 Time: 3+ | Time: 3438 
0       + | Time: 3551 
ime: 355- | Time: 3665 
...................

Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:2:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:5:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:3:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:4:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:6:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:8:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
Process PairTask-20:7:
Traceback (most recent call last):
  File "/data/zhangt8/conda/envs/telomerecat/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "parabam/core.pyx", line 288, in parabam.core.Task.run
  File "pysam/libchtslib.pyx", line 496, in pysam.libchtslib.HTSFile.seek
NotImplementedError: seek not implemented in files compressed by method 3
byb121 commented 4 years ago

Which version of pysam that you're using? If you install the version in the "requirement.txt" file, it should resolve the issue. Alternatively you can use our Docker container on Quay.io to run it.

xtmgah commented 4 years ago

@byb121 Thanks. Here are package list for telomerecat, can you let me know which package may cause this error:

# packages in environment at /data/zhangt8/conda/envs/telomerecat:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
argparse                  1.4.0                    pypi_0    pypi
ca-certificates           2020.1.1                      0  
certifi                   2020.4.5.1               py37_0  
ld_impl_linux-64          2.33.1               h53a641e_7  
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 9.1.0                hdf63c60_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
ncurses                   6.2                  he6710b0_1  
numpy                     1.18.3                   pypi_0    pypi
openssl                   1.1.1g               h7b6447c_0  
pandas                    1.0.3                    pypi_0    pypi
parabam                   2.3.0                    pypi_0    pypi
pip                       20.0.2                   py37_1  
pypdf2                    1.26.0                   pypi_0    pypi
pysam                     0.15.4                   pypi_0    pypi
python                    3.7.7           hcf32534_0_cpython  
python-dateutil           2.8.1                    pypi_0    pypi
pytz                      2020.1                   pypi_0    pypi
readline                  8.0                  h7b6447c_0  
setuptools                46.1.3                   py37_0  
six                       1.14.0                   pypi_0    pypi
sqlite                    3.31.1               h62c20be_1  
telomerecat               3.4.0                    pypi_0    pypi
tk                        8.6.8                hbc83047_0  
wheel                     0.34.2                   py37_0  
xz                        5.2.5                h7b6447c_0  
zlib                      1.2.11               h7b6447c_3  
byb121 commented 4 years ago

How did you produce you input BAM file? It seems pysam is not happy with your input file compressed by "method 3". I'm not sure what exact that compression method is. I think this is more like a pysam issue than telomerecat's.

If you could let us know how is your input is generated, we could put up a note for other users.

Thanks,

keiranmraine commented 4 years ago

The only constant == 3 related to compression I can find in htslib suggests the input file is CRAM. Is the file really valid?

https://github.com/samtools/htslib/blob/3f140ad0bd64beeed2884b818e7b7a08ef06721d/htslib/cram.h#L55

keiranmraine commented 4 years ago

Part of the message is from a "message" (not error) in parabam:

https://github.com/cancerit/parabam/pull/7