1 .TH tabix 1 "21 June 2017" "htslib-1.5" "Bioinformatics tools"
4 bgzip \- Block compression/decompression utility
6 tabix \- Generic indexer for TAB-delimited genome position files
8 .\" Copyright (C) 2009-2011 Broad Institute.
10 .\" Author: Heng Li <lh3@sanger.ac.uk>
12 .\" Permission is hereby granted, free of charge, to any person obtaining a
13 .\" copy of this software and associated documentation files (the "Software"),
14 .\" to deal in the Software without restriction, including without limitation
15 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 .\" and/or sell copies of the Software, and to permit persons to whom the
17 .\" Software is furnished to do so, subject to the following conditions:
19 .\" The above copyright notice and this permission notice shall be included in
20 .\" all copies or substantial portions of the Software.
22 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 .\" DEALINGS IN THE SOFTWARE.
55 .RI [ "region1 " [ "region2 " [ ... "]]]"
59 Tabix indexes a TAB-delimited genome position file
61 and creates an index file (
67 is absent from the command-line. The input data file must be position
68 sorted and compressed by
74 After indexing, tabix is able to quickly retrieve data lines overlapping
76 specified in the format "chr:beginPos-endPos".
77 (Coordinates specified in this region format are 1-based and inclusive.)
79 Fast data retrieval also
80 works over network if URI is given as a file name and in this case the
81 index file will be downloaded if it is not present locally.
86 Specify that the position in the data file is 0-based (e.g. UCSC files)
89 .BI "-b, --begin " INT
90 Column of start chromosomal position. [4]
92 .BI "-c, --comment " CHAR
93 Skip lines started with character CHAR. [#]
96 Produce CSI format index instead of classical tabix or BAI style indices.
99 Column of end chromosomal position. The end column can be the same as the
103 Force to overwrite the index file if it is present.
105 .BI "-m, --min-shift " INT
106 set minimal interval size for CSI indices to 2^INT [14]
108 .BI "-p, --preset " STR
109 Input format for indexing. Valid values are: gff, bed, sam, vcf.
110 This option should not be applied together with any of
111 .BR -s ", " -b ", " -e ", " -c " and " -0 ;
112 it is not used for data retrieval because this setting is stored in
113 the index file. [gff]
115 .BI "-s, --sequence " INT
116 Column of sequence name. Option
117 .BR -s ", " -b ", " -e ", " -S ", " -c " and " -0
118 are all stored in the index file and thus not used in data retrieval. [1]
120 .BI "-S, --skip-lines " INT
121 Skip first INT lines in the data file. [0]
123 .SH QUERYING AND OTHER OPTIONS
125 .B "-h, --print-header "
126 Print also the header/meta lines.
128 .B "-H, --only-header "
129 Print only the header/meta lines.
131 .B "-l, --list-chroms "
132 List the sequence names stored in the index file.
134 .B "-r, --reheader " FILE
135 Replace the header with the content of FILE
137 .B "-R, --regions " FILE
138 Restrict to regions listed in the FILE. The FILE can be BED file (requires .bed, .bed.gz, .bed.bgz
139 file name extension) or a TAB-delimited file with CHROM, POS, and, optionally,
140 POS_TO columns, where positions are 1-based and inclusive. When this option is in use, the input
141 file may not be sorted.
144 .B "-T, --targets" FILE
147 but the entire input will be read sequentially and regions not listed in FILE will be skipped.
150 (grep ^"#" in.gff; grep -v ^"#" in.gff | sort -k1,1 -k4,4n) | bgzip > sorted.gff.gz;
152 tabix -p gff sorted.gff.gz;
154 tabix sorted.gff.gz chr1:10,000,000-20,000,000;
157 It is straightforward to achieve overlap queries using the standard
158 B-tree index (with or without binning) implemented in all SQL databases,
159 or the R-tree index in PostgreSQL and Oracle. But there are still many
160 reasons to use tabix. Firstly, tabix directly works with a lot of widely
161 used TAB-delimited formats such as GFF/GTF and BED. We do not need to
162 design database schema or specialized binary formats. Data do not need
163 to be duplicated in different formats, either. Secondly, tabix works on
164 compressed data files while most SQL databases do not. The GenCode
165 annotation GTF can be compressed down to 4%. Thirdly, tabix is
166 fast. The same indexing algorithm is known to work efficiently for an
167 alignment with a few billion short reads. SQL databases probably cannot
168 easily handle data at this scale. Last but not the least, tabix supports
169 remote data retrieval. One can put the data file and the index at an FTP
170 or HTTP server, and other users or even web services will be able to get
171 a slice without downloading the entire file.
175 Tabix was written by Heng Li. The BGZF library was originally
176 implemented by Bob Handsaker and modified by Heng Li for remote file
177 access and in-memory caching.