Entering edit mode
2.8 years ago
Dan
▴
180
Hi
I am confusing what is happening if the input file name is the same as the output file in samtools sort
?
samtools sort -n file1.bam -o file1.bam
This command can run successfully, but is it correct?
Thanks a lot
Best
Dan
may be, because the output is written after all the reads have been read and sorted.
no. It's not the unix way, it looks weird, and there is no advantage compared to
It is also prone to disaster. If the job gets killed while the new file is being written then the data are lost and you have to repeat alignment. It’s bad practice don’t get used doing that.