Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
samtools-calmd(1)	     Bioinformatics tools	     samtools-calmd(1)

       samtools	calmd -	calculates MD and NM tags

       samtools	calmd [-Eeubr] [-C capQcoef] aln.bam ref.fasta

       Generate	 the  MD  tag.	If the MD tag is already present, this command
       will give a warning if the MD tag generated is different	from  the  ex-
       isting tag. Output SAM by default.

       Calmd  can  also	read and write CRAM files although in most cases it is
       pointless as CRAM recalculates MD and NM	tags on	the fly.  The one  ex-
       ception	to  this  case	is where both input and	output CRAM files have
       been / are being	created	with the no_ref	option.

       Note that some aligners do not include sequence or confidence values in
       secondary  and  supplementary alignment records.	 Where this happens in
       SAM files, a "*"	character will be seen in the SEQ  and	QUAL  columns.
       These records will be skipped, as it is not possible to recalculate the
       MD and NM tags without access to	the query  sequence.   samtools	 calmd
       will emit a warning if any records have been skipped for	this reason.

       -A      When  used  jointly with	-r this	option overwrites the original
	       base quality.

       -e      Convert a the read base to = if it is identical to the  aligned
	       reference  base.	 Indel	caller does not	support	the = bases at
	       the moment.

       -u      Output uncompressed BAM

       -b      Output compressed BAM

       -C INT  Coefficient to cap mapping quality of poorly mapped reads.  See
	       the mpileup command for details.	[0]

       -r      Compute	the  BQ	 tag  (without	-A) or cap base	quality	by BAQ
	       (with -A).

       -E      Extended	BAQ calculation. This option  trades  specificity  for
	       sensitivity, though the effect is minor.

       --no-PG Do not add a @PG	line to	the header of the output file.

       -@, --threads INT
	       Number  of  input/output	compression threads to use in addition
	       to main thread [0].

       o Dump BAQ applied alignment for	other SNP callers:

	   samtools calmd -bAr aln.bam > aln.baq.bam

	 It adds and corrects the NM and MD tags at the	same time.  The	 calmd
	 command  also	comes  with  the  -C  option,  the  same as the	one in
	 mpileup.  Apply if it helps.

       Written by Heng Li from the Sanger Institute.

       samtools(1), samtools-mpileup(1)

       Samtools	website: <>

samtools-1.11		       22 September 2020	     samtools-calmd(1)


Want to link to this manual page? Use this URL:

home | help