Can samtools sort sort a sam file by name directly? If I want to sort the sam file, what can I do?
Can A Bam File Be Sorted By The Read Names
Hi
Can we sort BAM files according to the read name? As the normal sorting happens on the co-ordinates, can anyone tell how to sort a BAM file on read names? I am trying to run HT-Seq count on paired end SAM files but receiving warnings for which I have to sort the BAM in read names and then create its SAM and then run HT-Seq
• 26,694 views
•
link
2 answers
• 0 views
•
link
You can sort a samfile with unix sort like so:
- remove the headers
- sort on the coordinate field
- put back the headers
• 0 views
•
link
See Picard's SortSam command below. You can sort a sam or bam file using queryname or readname.
http://picard.sourceforge.net/command-line-overview.shtml#SortSam
• 230 views
•
link
Log in to answer this question.