Sam/Bam Manipulation

bamtools
Function: The command bamtools random grabs a random subset of alignments. With the option -n 100, 100 randomly chosen alignments are stored in the output file output_alignments_100.bam.
Usage: bamtools random -in input_alignments.bam -out output_alignments_100.bam -n 100
samtools depad
Function: 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.
Usage: samtools depad [-SsCu1] [-T ref.fa] [-o output] <in.bam>
pints_visualizer
Function: Extract Transcription Start Sites (TSSs) from a bam file and save extracted signal into strand specific bigwig files
Usage: pints_visualizer -b sample.bam -o sample -e ExperimentType
STAR
Function: Generate wig files or remove duplicates for a bam file
Usage: STAR --runMode inputAlignmentsFromBAM --inputBAMfile path/to/bam --option1-name option1-value(s) ...
samtools ampliconclip
Function: Clips the ends of read alignments if they intersect with regions defined in a BED file.
Usage: samtools ampliconclip -b BED file <input.bam> -o <output.bam>
Supported input format: BAM