EOF marker is absent
0
0
Entering edit mode
7.6 years ago
reds.nik ▴ 40

Good morning, I am struggling with samtools merge bam files. I am trying to merge few bam files, which have been generated with speedseq align. I have to indipendently merge two sets of bam files and while samtools successfully merge and index the first set, it exit with an error fot the second set, stating that on the input bam files is truncated. I ran samtools quickcheck on all the input bam files and they look fine, plus I checked with : tail file.bam | hexdump -C for the 28 bytes enconding the EOF and all the input files again look fine. Any suggestions?? thanks

sequencing • 3.8k views
ADD COMMENT
0
Entering edit mode

Can you post the the hexdump output for the offending bam(s) together with your merge commandline?

ADD REPLY
0
Entering edit mode

Can you paste the verbatim error message here?

ADD REPLY
0
Entering edit mode

sure thanks. This is the end of the output

00000670  a9 c6 76 98 e1 bc f1 de  f0 30 c8 a2 51 70 78 43  |..v......0..QpxC|
00000680  9b 0e da d6 cf 2b b4 2f  96 81 36 13 8e db 99 88  |.....+./..6.....|
00000690  f3 18 ee f7 56 ee 76 06  8c 60 5a ee 53 cd 3d 77  |....V.v..`Z.S.=w|
000006a0  b6 0c 85 7b c0 ba 30 dd  24 9a cf 64 8c 85 3e 68  |...{..0.$..d..>h|
000006b0  f6 34 26 c0 0f e3 cc 60  b6 8e d3 85 2f 1c e5 89  |.4&....`..../...|
000006c0  e9 76 09 69 84 4b 30 44  60 94 e8 84 d7 e2 88 d3  |.v.i.K0D`.......|
000006d0  bc 0a ce 27 9a 58 80 35  d9 d5 af 1f 9d ed 96 10  |...'.X.5........|
000006e0  b1 20 53 85 ae a3 88 a2  89 0f 23 16 a6 27 9b 58  |. S.......#..'.X|
000006f0  a0 d8 25 ce b6 fa b1 4a  30 3a 85 61 46 bb 50 34  |..%....J0:.aF.P4|
00000700  85 e9 3f 90 a8 4e 32 90  e7 68 c8 08 01 72 dd de  |..?..N2..h...r..|
00000710  bb f8 1f 61 df fc ed af  0c 00 00 1f 8b 08 04 00  |...a............|
00000720  00 00 00 00 ff 06 00 42  43 02 00 1b 00 03 00 00  |.......BC.......|
00000730  00 00 00 00 00 00 00                              |.......|
00000737

and the command that I used:

samtools merge 6148_merged.bam 6148.bam 6148.discordants.bam  6148.splitters.bam &> 6148_merge_local.log

I used the same command for another set of bam files, which exited successfully

ADD REPLY
0
Entering edit mode

Odd, which version of samtools are you using? The end of the file looks correct.

ADD REPLY
0
Entering edit mode

I am using samtools 1.3.1, should I try with the last version? thanks

ADD REPLY
1
Entering edit mode

It's worth a try.

ADD REPLY
1
Entering edit mode

That should be your first reflex: update old tools :-)
(even if it doesn't solve your issue it doesn't hurt to work with up to date software)

ADD REPLY
1
Entering edit mode

(even if it doesn't solve your issue it doesn't hurt to work with up to date software)

Normally yes. However, the nays come with the fact that sometimes the s/w are not back compatible (e.g. changes in command line options like samtools sort) and still some other time they depend upon many other pkgs/tools (esp in R), which are not synchronized for version changes :-( E.g. One small change in mifi pkg creating havoc

ChAMP error in EPIC data import

A: ChAMP error in EPIC data import

ADD REPLY
0
Entering edit mode

If the new samtools doesn't solve the problem, you may try converting your offending bam to sam and then back to bam. It might be possible that your bam is malformed somewhere in the middle (which quickcheck can't detect).

ADD REPLY
0
Entering edit mode

I've trying both by merging the bam files with last version of samtools and by converting the offending bam to sam and then back to bam. I still get the error message.. I really have no idea what can be wrong with this file.

ADD REPLY
1
Entering edit mode

Why not try using some other alignment program (not sure what speedseq align is). It may be speedseq's fault somewhere else in the file.

ADD REPLY
0
Entering edit mode

If you can make a small enough example then create an issue on the samtools github repository and link to the file. The developers can get it sorted out for the next release then.

ADD REPLY

Login before adding your answer.

Traffic: 2565 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6