Description
Subtools
- samtools quickcheck
samtools quickcheck [options] in.sam|in.bam|in.cram [ ... ] Quickly check that input files appear to be intact. Checks that beginning of the file cont
- samtools view
samtools view [options] in.sam|in.bam|in.cram [region...] With no options or regions specified, prints all alignments in the specified input alignment
- samtools idxstats
samtools idxstats in.sam|in.bam|in.cram Retrieve and print stats in the index file corresponding to the input file. Before calling idxstats, the input
- samtools cat
samtools cat [-b list] [-h header.sam] [-o out.bam] in1.bam in2.bam [ ... ] Concatenate BAMs or CRAMs. Although this works on either BAM or CRAM, all
- samtools fastq
samtools fastq [options] in.bam samtools fasta [options] in.bam Converts a BAM or CRAM into either FASTQ or FASTA format depending on the command invo
- samtools bedcov
samtools bedcov [options] region.bed in1.sam|in1.bam|in1.cram[...] Reports the total read base count (i.e. the sum of per base read depths) for each g
- samtools view_filter
Reads with a mapping quality below min-mapping-quality will be excluded
- samtools depad
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 referen
- samtools view_count_alignments
Count alignments
- samtools faidx
samtools faidx <ref.fasta> [region1 [...]] Index reference sequence in the FASTA format or extract subsequence from indexed reference sequence. If no
- samtools sort
samtools sort [-l level] [-m maxMem] [-o out.bam] [-O format] [-n] [-t tag] [-T tmpprefix] [-@ threads] [in.sam|in.bam|in.cram] Sort alignments by lef
- samtools view_sam2bam
convert sam to bam using samtools view
- samtools calmd
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
- samtools flagstat
samtools flagstat in.sam|in.bam|in.cram Does a full pass through the input file to calculate and print statistics to stdout. Provides counts for each
- samtools collate
samtools collate [options] in.sam|in.bam|in.cram [<prefix>] Shuffles and groups reads together by their names. A faster alternative to a full query na
- samtools fqidx
samtools fqidx <ref.fastq> [region1 [...]] Index reference sequence in the FASTQ format or extract subsequence from indexed reference sequence. If no
- samtools addreplacerg
samtools addreplacerg [-r rg-line | -R rg-ID] [-m mode] [-l level] [-o out.bam] in.bam Adds or replaces read group tags in a file.
- samtools merge
samtools merge [-nur1f] [-h inh.sam] [-t tag] [-R reg] [-b list] out.bam in1.bam [in2.bam in3.bam ... inN.bam] Merge multiple sorted alignment files,
- samtools bam2fq_interleaved
Convert BAM to fastq
- samtools depth
samtools depth [options] [in1.sam|in1.bam|in1.cram [in2.sam|in2.bam|in2.cram] [...]] Computes the read depth at each position or region.
- samtools markdup
samtools markdup [-l length] [-r] [-s] [-T] [-S] in.algsort.bam out.bam Mark duplicate alignments from a coordinate sorted file that has been run thro
- samtools targetcut
This command identifies target regions by examining the continuity of read depth, computes haploid consensus sequences of targets and outputs a SAM wi
- samtools split
samtools split [options] merged.sam|merged.bam|merged.cram Splits a file by read group, producing one or more output files matching a common prefix (b
- samtools dict
samtools dict ref.fasta|ref.fasta.gz Create a sequence dictionary file from a fasta file.
- samtools fixmate
samtools fixmate [-rpcm] [-O format] in.nameSrt.bam out.bam Fill in mate coordinates, ISIZE and mate related flags from a name-sorted alignment.
- samtools reheader
samtools reheader [-iP] in.header.sam in.bam Replace the header in in.bam with the header in in.header.sam. This command is much faster than replacing
- samtools mpileup
samtools mpileup [-EB] [-C capQcoef] [-r reg] [-f in.fa] [-l list] [-Q minBaseQ] [-q minMapQ] in.bam [in2.bam [...]] Generate textual pileup for one o
- samtools stats
samtools stats [options] in.sam|in.bam|in.cram [region...] samtools stats collects statistics from BAM files and outputs in a text format. The output
- samtools fasta
samtools fastq [options] in.bam samtools fasta [options] in.bam Converts a BAM or CRAM into either FASTQ or FASTA format depending on the command invo
- samtools flags
samtools flags INT|STR[,...] Convert between textual and numeric flag representation. FLAGS: 0x1 PAIRED paired-end (or multiple-segment) sequencing te
- samtools index
samtools index [-bc] [-m INT] aln.bam|aln.cram [out.index] Index a coordinate-sorted BAM or CRAM file for fast random access. (Note that this does no
- samtools phase
samtools phase [-AF] [-k len] [-b prefix] [-q minLOD] [-Q minBaseQ] in.bam Call and phase heterozygous SNPs.
- samtools tview
samtools tview [-p chr:pos] [-s STR] [-d display] <in.sorted.bam> [ref.fasta] Text alignment viewer (based on the ncurses library). In the viewer, pre
Author(s)
- Heng Li
- Bob Handsaker
- Jue Ruan
- Colin Hercus
- Petr Danecek
Code Repository
- GitHub
https://github.com/samtools/samtools