KChen-lab / Monopogen

SNV calling from single cell sequencing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't decode byte 0x8b in position 1: invalid start byte

ayavuzcakir opened this issue · comments

I wanted to try Monopogen on my GEX-cellranger output, first started with preprocess.py, however, it directly gave me the following error;

Traceback (most recent call last):
File "/path/Monopogen/src/Monopogen.py", line 435, in
main()
File "/path/Monopogen/src/Monopogen.py", line 428, in main
args.func(args)
File "/path/Monopogen/src/Monopogen.py", line 291, in preProcess
for line in f_in:
File "/miniconda3/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

My BAM file is not gzipped, I even tested with different BAM files but the result was the same, I looked into the source code and saw that it tries to open a BAM file with "with open" and seems like it causes the error, can you please help regarding this one?

Hi, Monopogen uses the function pysam.AlignmentFile to load the bam files. The open function opens the bam file list (not the bam files). Would you mind share with me a subset of your bam files so that I can examine what happens inside?

Hi, Monopogen uses the function pysam.AlignmentFile to load the bam files. The open function opens the bam file list (not the bam files). Would you mind share with me a subset of your bam files so that I can examine what happens inside?

Oh my bad, I somehow thought I could input a bam file directly :/ Now I tried with a .lst file and then worked! Thank you for your reply!