Entering edit mode
3.0 years ago
quentin54520
▴
120
Hello all,
I want to sort my bam by queryname so i used the command:
Samtools sort -n -m 1 -@ 10 -o /Path/ouput.bam /path/input.bam
It's work fine but at the end the ouput.bam is really bigger thant input.bam (70Go vs 47Go). It is normal ? Before to go on with this bam i prefer be sure... My input bam is the ouput of samtools view (to remove unwanted read).
Thanks in advance,
Quentin
I would suggest to always be explicit when setting memory limits, so 1G rather than 1. Maybe they made it bullet-proof in recent samtools versions but (if memory serves) there was I think a time when
-m 1
was interpreted as memory=1byte and this resulted in samtools spamming the disk with millions of tiny temporary files for each chunk. Can be that I mix it up with another tool, but it does not hurt to be explicit. But yes, as Pierre says this behaviour is expected.Thanks for your reply. Yes in the real command i put 1G but i forgot here sorry 🙂