samtools depad [-SsCu1] [-T ref.fa] [-o output] in.bam
Converts a BAM aligned against a padded reference to a BAM aligned against the depadded reference. The padded reference may contain verbatim "*" bases in it, but "*" bases are also counted in the reference numbering. This means that a sequence base-call aligned against a reference "*" is considered to be a cigar match ("M" or "X") operator (if the base-call is "A", "C", "G" or "T"). After depadding the reference "*" bases are deleted and such aligned sequence base-calls become insertions. Similarly transformations apply for deletions and padding cigar operations.
Ignored for compatibility with previous samtools versions. Previously this option was required if input was in SAM format, but now the correct format is automatically detected by examining the first few characters of input.
Output in SAM format. The default is BAM.
Output in CRAM format. The default is BAM.
Do not compress the output. Applies to either BAM or CRAM output format.
Enable fastest compression level. Only works for BAM or CRAM output.
Provides the padded reference file. Note that without this the @SQ line lengths will be incorrect, so for most use cases this option will be considered as mandatory.
Specifies the output filename. By default output is sent to stdout.
Do not add a @PG line to the header of the output file.
Written by Heng Li from the Sanger Institute with extensions by Peter Cock from the James Hutton Institute.
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.