Tools for handling high-throughput sequencing (genomics) data. Used for reading/writing/editing/indexing/viewing of data in SAM/BAM/CRAM format. More information: https://www.htslib.org.
samtools view -S -b input.sam > output.bam
stdin
(-) and print the SAM header and any reads overlapping a specific region to stdout
:other_command | samtools view -h - chromosome:start-end
samtools sort input -o output.bam
sorted_input.bam.bai
):samtools index sorted_input.bam
samtools flagstat sorted_input
samtools idxstats sorted_indexed_input
samtools merge output input1 input2 ...
samtools split merged_input