tabix.1 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .TH tabix 1 "11 May 2010" "tabix-0.2.0" "Bioinformatics tools"
  2. .SH NAME
  3. .PP
  4. bgzip - Block compression/decompression utility
  5. .PP
  6. tabix - Generic indexer for TAB-delimited genome position files
  7. .SH SYNOPSIS
  8. .PP
  9. .B bgzip
  10. .RB [ \-cdhB ]
  11. .RB [ \-b
  12. .IR virtualOffset ]
  13. .RB [ \-s
  14. .IR size ]
  15. .RI [ file ]
  16. .PP
  17. .B tabix
  18. .RB [ \-0lf ]
  19. .RB [ \-p
  20. .R gff|bed|sam|vcf]
  21. .RB [ \-s
  22. .IR seqCol ]
  23. .RB [ \-b
  24. .IR begCol ]
  25. .RB [ \-e
  26. .IR endCol ]
  27. .RB [ \-S
  28. .IR lineSkip ]
  29. .RB [ \-c
  30. .IR metaChar ]
  31. .I in.tab.bgz
  32. .RI [ "region1 " [ "region2 " [ ... "]]]"
  33. .SH DESCRIPTION
  34. .PP
  35. Tabix indexes a TAB-delimited genome position file
  36. .I in.tab.bgz
  37. and creates an index file
  38. .I in.tab.bgz.tbi
  39. when
  40. .I region
  41. is absent from the command-line. The input data file must be position
  42. sorted and compressed by
  43. .B bgzip
  44. which has a
  45. .BR gzip (1)
  46. like interface. After indexing, tabix is able to quickly retrieve data
  47. lines overlapping
  48. .I regions
  49. specified in the format "chr:beginPos-endPos". Fast data retrieval also
  50. works over network if URI is given as a file name and in this case the
  51. index file will be downloaded if it is not present locally.
  52. .SH OPTIONS OF TABIX
  53. .TP 10
  54. .BI "-p " STR
  55. Input format for indexing. Valid values are: gff, bed, sam, vcf and
  56. psltab. This option should not be applied together with any of
  57. .BR \-s ", " \-b ", " \-e ", " \-c " and " \-0 ;
  58. it is not used for data retrieval because this setting is stored in
  59. the index file. [gff]
  60. .TP
  61. .BI "-s " INT
  62. Column of sequence name. Option
  63. .BR \-s ", " \-b ", " \-e ", " \-S ", " \-c " and " \-0
  64. are all stored in the index file and thus not used in data retrieval. [1]
  65. .TP
  66. .BI "-b " INT
  67. Column of start chromosomal position. [4]
  68. .TP
  69. .BI "-e " INT
  70. Column of end chromosomal position. The end column can be the same as the
  71. start column. [5]
  72. .TP
  73. .BI "-S " INT
  74. Skip first INT lines in the data file. [0]
  75. .TP
  76. .BI "-c " CHAR
  77. Skip lines started with character CHAR. [#]
  78. .TP
  79. .B -0
  80. Specify that the position in the data file is 0-based (e.g. UCSC files)
  81. rather than 1-based.
  82. .TP
  83. .B -h
  84. Print the header/meta lines.
  85. .TP
  86. .B -B
  87. The second argument is a BED file. When this option is in use, the input
  88. file may not be sorted or indexed. The entire input will be read sequentially. Nonetheless,
  89. with this option, the format of the input must be specificed correctly on the command line.
  90. .TP
  91. .B -f
  92. Force to overwrite the index file if it is present.
  93. .TP
  94. .B -l
  95. List the sequence names stored in the index file.
  96. .RE
  97. .SH EXAMPLE
  98. (grep ^"#" in.gff; grep -v ^"#" in.gff | sort -k1,1 -k4,4n) | bgzip > sorted.gff.gz;
  99. tabix -p gff sorted.gff.gz;
  100. tabix sorted.gff.gz chr1:10,000,000-20,000,000;
  101. .SH NOTES
  102. It is straightforward to achieve overlap queries using the standard
  103. B-tree index (with or without binning) implemented in all SQL databases,
  104. or the R-tree index in PostgreSQL and Oracle. But there are still many
  105. reasons to use tabix. Firstly, tabix directly works with a lot of widely
  106. used TAB-delimited formats such as GFF/GTF and BED. We do not need to
  107. design database schema or specialized binary formats. Data do not need
  108. to be duplicated in different formats, either. Secondly, tabix works on
  109. compressed data files while most SQL databases do not. The GenCode
  110. annotation GTF can be compressed down to 4%. Thirdly, tabix is
  111. fast. The same indexing algorithm is known to work efficiently for an
  112. alignment with a few billion short reads. SQL databases probably cannot
  113. easily handle data at this scale. Last but not the least, tabix supports
  114. remote data retrieval. One can put the data file and the index at an FTP
  115. or HTTP server, and other users or even web services will be able to get
  116. a slice without downloading the entire file.
  117. .SH AUTHOR
  118. .PP
  119. Tabix was written by Heng Li. The BGZF library was originally
  120. implemented by Bob Handsaker and modified by Heng Li for remote file
  121. access and in-memory caching.
  122. .SH SEE ALSO
  123. .PP
  124. .BR samtools (1)