nservant / HiC-Pro

HiC-Pro: An optimized and flexible pipeline for Hi-C data processing
Other
386 stars 182 forks source link

mergeSAM.py error #660

Open WanghcPKU opened 3 days ago

WanghcPKU commented 3 days ago

Hello! My program meets some problems. I checked the log file, and found this. The first time I ran my code, I got this error.

[E::bgzf_uncompress] Inflate operation failed: 3 [E::bgzf_read] Read block operation failed with error 1 after 0 of 4 bytes

Traceback (most recent call last): File "/lustre/user/taowlab/wanghc/work/AC/hic/HiC-Pro_3.1.0/scripts/mergeSAM.py", line 223, in for r1, r2 in zip(hr1.fetch(until_eof=True), hr2.fetch(until_eof=True)): File "pysam/libcalignmentfile.pyx", line 2209, in pysam.libcalignmentfile.IteratorRowAll.next OSError: truncated file

The second time I ran my code, I got this error.

[E::bgzf_read_block] Invalid BGZF header at offset 23494271862 [E::bgzf_read] Read block operation failed with error 2 after 0 of 4 bytes

Traceback (most recent call last): File "/lustre/user/taowlab/wanghc/work/AC/hic/HiC-Pro_3.1.0/scripts/mergeSAM.py", line 223, in for r1, r2 in zip(hr1.fetch(until_eof=True), hr2.fetch(until_eof=True)): File "pysam/libcalignmentfile.pyx", line 2209, in pysam.libcalignmentfile.IteratorRowAll.next OSError: truncated file

I really need your help!

nservant commented 3 days ago

Could you check if the BAM files are not truncated please ? or corrupted ?

WanghcPKU commented 3 days ago

Could you check if the BAM files are not truncated please ? or corrupted ?

I tried the code "samtools quickcheck ... " to check the BAM files. They were not truncated or corrupted.

WanghcPKU commented 3 days ago

Could you check if the BAM files are not truncated please ? or corrupted ?

I tried the code "bgzip -t ...." to cheack and showed the problem that [E::bgzf_read_block] Invalid BGZF header at offset 23494271862 [E::bgzf_read] Read block operation failed with error 2 after 50770 of 65280 bytes Error 3 in block starting at offset 23494271834(5785E235A)

How can I solve these problems?

nservant commented 3 days ago

no idea. I guess something went wrong during the mapping and the samtools merge command. This could be like to your infrastructure ... like a job which is killed while it was working. I would suggest to rerun from scratch, and to carrefully monitor each step