BAM file became smaller after merging
0
0
Entering edit mode
13 months ago
kimmitzka • 0

Hello all

I merged 3 bam files but the merge one size were quite smaller than before. Does anyone know the reason?

Thanks

My code is

samtools merge output.bam input1.bam input2.bam input3.bam
BAM • 563 views
ADD COMMENT
0
Entering edit mode

what is the output of

file input1.bam input2.bam input3.bam

?

ADD REPLY
0
Entering edit mode

output.bam here

ADD REPLY
0
Entering edit mode

output.bam here

That can't be the output of the command @Pierre asked you to run.

That aside it is possible to have final output BAM files drop in size after operations that change the read order since the data can compress better leading to smaller files.

ADD REPLY
0
Entering edit mode

so could you tell me how to do if I want to merger these files? Thxx

ADD REPLY
0
Entering edit mode

Your command looks fine. I assume you are referring to output file being smaller than adding sizes of the three inputs? Are your input BAM files sorted?

ADD REPLY

Login before adding your answer.

Traffic: 2168 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