File: samtools-faidx.1

package info (click to toggle)
samtools 1.21-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 21,804 kB
  • sloc: ansic: 33,931; perl: 7,702; sh: 452; makefile: 298; java: 158
file content (148 lines) | stat: -rw-r--r-- 4,693 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
'\" t
.TH samtools-faidx 1 "12 September 2024" "samtools-1.21" "Bioinformatics tools"
.SH NAME
samtools faidx \- indexes or queries regions from a fasta file
.\"
.\" Copyright (C) 2008-2011, 2013-2018, 2020, 2024 Genome Research Ltd.
.\" Portions copyright (C) 2010, 2011 Broad Institute.
.\"
.\" Author: Heng Li <lh3@sanger.ac.uk>
.\" Author: Joshua C. Randall <jcrandall@alum.mit.edu>
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
.\" copy of this software and associated documentation files (the "Software"),
.\" to deal in the Software without restriction, including without limitation
.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
.\" and/or sell copies of the Software, and to permit persons to whom the
.\" Software is furnished to do so, subject to the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
.\" DEALINGS IN THE SOFTWARE.
.
.\" For code blocks and examples (cf groff's Ultrix-specific man macros)
.de EX

.  in +\\$1
.  nf
.  ft CR
..
.de EE
.  ft
.  fi
.  in

..
.
.SH SYNOPSIS
.PP
samtools faidx
.IR ref.fasta " [" region1 " [...]]"

.SH DESCRIPTION
.PP
Index reference sequence in the FASTA format or extract subsequence from
indexed reference sequence. If no region is specified,
.B faidx
will index the file and create
.I <ref.fasta>.fai
on the disk. If regions are specified, the subsequences will be
retrieved and printed to stdout in the FASTA format.

The input and output can be files compressed in the
.B BGZF
format. When output is compressed, the default compression level is 4.

The sequences in the input file should all have different names.
If they do not, indexing will emit a warning about duplicate sequences and
retrieval will only produce subsequences from the first sequence with the
duplicated name.

FASTQ files can be read and indexed by this command.  Without using
.B --fastq
any extracted subsequence will be in FASTA format.

.SH OPTIONS

.TP 8
.BI "-o, --output " FILE
Write FASTA to file rather than to stdout. With .gz, .bgz, .bgzf file extensions
the output will be
.B BGZF
compressed.
.TP
.BI "-n, --length " INT
Length for FASTA sequence line wrapping.  If zero, this means do not
line wrap.  Defaults to the line length in the input file.
.TP
.B -c, --continue
Continue working if a non-existent region is requested.
.TP
.BI "-r, --region-file " FILE
Read regions from a file. Format is chr:from-to, one per line.
.TP
.B -f, --fastq
Read FASTQ files and output extracted sequences in FASTQ format.  Same as using samtools fqidx.
.TP
.B -i, --reverse-complement
Output the sequence as the reverse complement.
When this option is used, \*(lq/rc\*(rq will be appended to the sequence names.
To turn this off or change the string appended, use the
.B --mark-strand
option.
.TP
.B     --mark-strand TYPE
Append strand indicator to sequence name.  TYPE can be one of:
.RS
.TP
.B rc
Append '/rc' when writing the reverse complement.  This is the default.
.TP
.B no
Do not append anything.
.TP
.B sign
Append '(+)' for forward strand or '(-)' for reverse complement.  This matches
the output of \*(lqbedtools getfasta -s\*(rq.
.TP
.B custom,<pos>,<neg>
Append string <pos> to names when writing the forward strand and <neg> when
writing the reverse strand.  Spaces are preserved, so it is possible to move
the indicator into the comment part of the description line by including
a leading space in the strings <pos> and <neg>.
.RE
.TP
.B --fai-idx FILE
Read/Write to specified index file.
.TP
.B --gzi-idx FILE
Read/Write to specified compressed file index (used with .gz files).
.TP
.B -h, --help
Print help message and exit.
.TP
.BI --output-fmt-option\  OPT=VAL
Set the output format options, level=0..9 for compression level 0 to 9.
.TP
.BI "-@, --threads " N
Set the number of extra threads for operations on compressed files.

.SH AUTHOR
.PP
Written by Heng Li, with modifications by Andrew Whitwham and Robert Davies,
all from the Sanger Institute.

.SH SEE ALSO
.IR samtools (1),
.IR samtools-fasta (1),
.IR samtools-fqidx (1),
.IR samtools-fastq (1)
.PP
Samtools website: <http://www.htslib.org/>