Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mergeSAM.py error #660

Open
WanghcPKU opened this issue Nov 19, 2024 · 4 comments
Open

mergeSAM.py error #660

WanghcPKU opened this issue Nov 19, 2024 · 4 comments

Comments

@WanghcPKU
Copy link

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
Copy link
Owner

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

@WanghcPKU
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants