On Wed, Jan 12, 2022 at 07:47:44PM +0000, Zhezhen Wang wrote: > I'm using samtool/1.9.0 and I'm trying to merge 2 files, but what I observed > is when I give the inputs in different order I get very different output. > > I have f1.bam 3G and f2.bam 200M. When I do samtools merge output.bam f1.bam > f2.bam, I get a that's slightly larger than 3G. When I do samtools merge > output.bam f2.bam f1.bam, I get a that's slightly larger than 200M. I'm sure > they are not just f1.bam or f2.bam, but I wonder what could have been wrong > or is it a issue with samtools/1.9.0?
Check the files position sorted. I wouldn't expect much difference in size, although possibly some minor changes in layout due to ties being resolved differently. James -- James Bonfield (j...@sanger.ac.uk) The Sanger Institute, Hinxton, Cambs, CB10 1SA -- The Wellcome Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help