1samtools-faidx(1)            Bioinformatics tools            samtools-faidx(1)
2
3
4

NAME

6       samtools faidx - indexes or queries regions from a fasta file
7

SYNOPSIS

9       samtools faidx ref.fasta [region1 [...]]
10
11

DESCRIPTION

13       Index  reference  sequence  in  the FASTA format or extract subsequence
14       from indexed reference sequence. If no region is specified, faidx  will
15       index  the  file and create <ref.fasta>.fai on the disk. If regions are
16       specified, the subsequences will be retrieved and printed to stdout  in
17       the FASTA format.
18
19       The input file can be compressed in the BGZF format.
20
21       The  sequences  in  the input file should all have different names.  If
22       they do not, indexing will emit a warning about duplicate sequences and
23       retrieval  will  only produce subsequences from the first sequence with
24       the duplicated name.
25
26       FASTQ files can be read and indexed by  this  command.   Without  using
27       --fastq any extracted subsequence will be in FASTA format.
28
29

OPTIONS

31       -o, --output FILE
32               Write FASTA to file rather than to stdout.
33
34       -n, --length INT
35               Length of FASTA sequence line.  [60]
36
37       -c, --continue
38               Continue working if a non-existent region is requested.
39
40       -r, --region-file FILE
41               Read regions from a file. Format is chr:from-to, one per line.
42
43       -f, --fastq
44               Read  FASTQ  files and output extracted sequences in FASTQ for‐
45               mat.  Same as using samtools fqidx.
46
47       -i, --reverse-complement
48               Output the sequence as the reverse complement.  When  this  op‐
49               tion is used, “/rc” will be appended to the sequence names.  To
50               turn this off or change the string appended,  use  the  --mark-
51               strand option.
52
53       --mark-strand TYPE
54               Append strand indicator to sequence name.  TYPE can be one of:
55
56               rc     Append  '/rc' when writing the reverse complement.  This
57                      is the default.
58
59               no     Do not append anything.
60
61               sign   Append '(+)' for forward strand  or  '(-)'  for  reverse
62                      complement.   This  matches the output of “bedtools get‐
63                      fasta -s”.
64
65               custom,<pos>,<neg>
66                      Append string <pos> to names when  writing  the  forward
67                      strand  and <neg> when writing the reverse strand.  Spa‐
68                      ces are preserved, so it is possible to move the indica‐
69                      tor into the comment part of the description line by in‐
70                      cluding a leading space in the strings <pos> and <neg>.
71
72       --fai-idx FILE
73               Read/Write to specified index file.
74
75       --gzi-idx FILE
76               Read/Write to specified compressed file index  (used  with  .gz
77               files).
78
79       -h, --help
80               Print help message and exit.
81
82

AUTHOR

84       Written  by  Heng  Li, with modifications by Andrew Whitwham and Robert
85       Davies, all from the Sanger Institute.
86
87

SEE ALSO

89       samtools(1), samtools-fasta(1), samtools-fqidx(1), samtools-fastq(1)
90
91       Samtools website: <http://www.htslib.org/>
92
93
94
95samtools-1.15.1                  7 April 2022                samtools-faidx(1)
Impressum