![Forrest logo](/images/logo.png)
samtools:tldr:50b74
The samtools idxstats
command is used to retrieve the statistics of an indexed SAM or BAM file. It provides information about the alignment and mapping of reads within the file, which can be useful for various downstream analyses.
Here's a breakdown of the command:
-
samtools
: This is the program or tool that is being executed. It is a widely-used command-line tool for working with SAM (Sequence Alignment/Map) and BAM (Binary Alignment/Map) files. It provides various functionalities for manipulating and analyzing sequencing data. -
idxstats
: This is a specific command within thesamtools
tool. It is used to retrieve index statistics. -
${sorted_indexed_input}
: This is a placeholder or variable that represents the input file name, specifically a sorted and indexed SAM or BAM file. The${}
syntax is commonly used to reference variables or placeholders in command lines. You would typically replace${sorted_indexed_input}
with the actual file path and name of the sorted and indexed input file you want to analyze.
By running this command with the appropriate input file, samtools idxstats
will generate a list summarizing the alignment statistics for each reference sequence (chromosome) present in the input file. The output typically consists of several columns including reference sequence name, sequence length, number of mapped reads, and number of unmapped reads.