This script will sort the unsorted.bam using 8 threads that allocates 12G of memory per thread. The resulting sorted .bam file will be called sorted.bam.
To confirm a .bam file is sorted, check the header (samtools view -H sorted.bam) for the line:
SO:coordinate.
Additionally, here is the usage information for Samtools sort:
Usage: samtools sort [options]
Options: -n sort by read name
-f use
-o final output to stdout
-l INT compression level, from 0 to 9 [-1]
-@ INT number of sorting and compression threads [1]
-m INT max memory per thread; suffix K/M/G recognized [768M]
No comments:
Post a Comment