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

cannot index extracted contigs #4

Open
JWDebler opened this issue Sep 30, 2021 · 2 comments
Open

cannot index extracted contigs #4

JWDebler opened this issue Sep 30, 2021 · 2 comments

Comments

@JWDebler
Copy link

Hi,

I extracted individual contigs from a bam file using:

BamDeal_Linux modify bamSplit -r -i me14.sorted.again.bam
and
BamDeal_Linux modify bamSplit -i me14.sorted.again.bam

However, when I try to index the extracted contigs with samtools (1.13) I get this error:

samtools index ArME14_ctg_01.bam
[W::bam_hdr_read] EOF marker is absent. The input is probably truncated
[E::bgzf_read_block] Failed to read BGZF block data at offset 1146092758 expected 7118 bytes; hread returned 792
[E::bgzf_read] Read block operation failed with error 4 after 0 of 4 bytes
samtools index: failed to create index for "ArME14_ctg_01.bam": No such file or directory

Trying to index the original bam file me14.sorted.again.bam works just fine.
Any idea what is going on?

I am using BamDeal 0.25

Cheers,
Johannes

@JWDebler
Copy link
Author

It looks like the problem was that I tried to index the bam files before bamSplit was finished.

@hewm2008
Copy link
Contributor

Dear @JWDebler

EOF marker is absent. The input is probably truncated
This error is just because your bam file is incomplete, so you need to regenerate this file

Linux generally cannot open too many files at the same time. I guess you have too many chr names, that is, an error occurs when you open too many files at the same time. I suggest that you can generate those scaf (contig) into the same bam.
you can use
BamDeal_Linux modify bamAssign
and see the help first
BamDeal_Linux modify bamAssign -h

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