samtools fixmate [-rpcm] [-O format] in.nameSrt.bam out.bam
Fill in mate coordinates, ISIZE and mate related flags from a name-sorted alignment.
Remove secondary and unmapped reads.
Disable FR proper pair check.
Add template cigar ct tag.
Add ms (mate score) tags. These are used by markdup to select the best reads to keep.
Write the final output as sam, bam, or cram.
By default, samtools tries to select a format based on the output filename extension; if output is to standard output or no format can be deduced, bam is selected.
Do not add a @PG line to the header of the output file.
Written by Heng Li from the Sanger Institute.
samtools (1), samtools-markdup (1), samtools-sort (1)
Samtools website: <http://www.htslib.org/>
Copyright © 2019 Genome Research Limited (reg no. 2742969) is a charity registered in England with number 1021457. Terms and conditions.