Alan,
Tom is right, it only works with bgzipped data sorted by chr and at least
start-coordinate.
BUT
You can have these columns where you like in your tabular data, not necessarily
in column 1 and 2 as found in bed/vcf files
To handle more exotic column numbers, you can tune your tabix command
tabix -h
-0, --zero-based coordinates are zero-based
-b, --begin INT column number for region start [4]
-c, --comment CHAR skip comment lines starting with CHAR [null]
-C, --csi generate CSI index for VCF (default is TBI)
-e, --end INT column number for region end (if no end, set INT
to -b) [5]
...
-p, --preset STR gff, bed, sam, vcf
-s, --sequence INT column number for sequence names (suppressed by
-p) [1]
…
ALT when you use gff vcf bed or sam you have the -p argument to tell tabix what
to expect
Tabix is really amazing for searching through huge data files!
S
Stéphane Plaisance – Staff Scientist | Bioinformatician
VIB Nucleomics Core
Campus Gasthuisberg
Herestraat 49 – Post Box 816 – 3000 Leuven – Belgium
O&N4 Building – 8th Floor – Room 08.440
Tel. +32 16 37 31 26
Lync. +32 16 32 00 60
www.nucleomics.be <http://www.nucleomics.be/> <http://www.nucleomics.be/>
<http://www.nucleomics.be/> <http://www.nucleomics.be/> <http://www.vib.be/>
> On 04 Sep 2017, at 14:07, samtools-help-requ...@lists.sourceforge.net wrote:
>
> Send Samtools-help mailing list submissions to
> samtools-help@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/samtools-help
> or, via email, send a message with subject or body 'help' to
> samtools-help-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
> samtools-help-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Samtools-help digest..."
>
>
> Today's Topics:
>
> 1. use tabix with multi-chromosome file (Alan Achenbach)
> 2. Re: use tabix with multi-chromosome file (Thomas W. Blackwell)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 3 Sep 2017 19:28:38 +0000
> From: Alan Achenbach <alan.achenb...@utah.edu>
> To: "samtools-help@lists.sourceforge.net"
> <samtools-help@lists.sourceforge.net>
> Subject: [Samtools-help] use tabix with multi-chromosome file
> Message-ID:
> <a27cc31880704940a9af45b4405df85e32d17...@x-mb9.xds.umail.utah.edu>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Can tabix be used to index multi-chromosome files? What is used for begin
> and end if I have chromosome in column one and position in column two of a
> non-vcf file?
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 2
> Date: Sun, 3 Sep 2017 17:31:17 -0400 (EDT)
> From: "Thomas W. Blackwell" <tbla...@umich.edu>
> To: Alan Achenbach <alan.achenb...@utah.edu>
> Cc: "samtools-help@lists.sourceforge.net"
> <samtools-help@lists.sourceforge.net>
> Subject: Re: [Samtools-help] use tabix with multi-chromosome file
> Message-ID:
> <alpine.lrh.2.20.1709031726070.22...@megaman.dsc.umich.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Alan -
>
> Yes, tabix works fine for indexing and retrieval from
> multi-chromosome files. It relies on the extra fields
> provided by bgzip compression, not simply gzip. I think
> it doesn't work on uncompressed files. The entries for
> each chromosome must be sorted. Chromosome in column 1
> and position in column 2 should be close enough to .vcf
> format so that tabix will work with no additional
> arguments. Give it a try.
>
> - tom blackwell -
>
> On Sun, 3 Sep 2017, Alan Achenbach wrote:
>
>> Can tabix be used to index multi-chromosome files? What is used for begin
>> and end if I have chromosome in column one and position in column two of a
>> non-vcf file?
>>
>
>
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Samtools-help mailing list
> Samtools-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/samtools-help
>
>
> ------------------------------
>
> End of Samtools-help Digest, Vol 104, Issue 1
> *********************************************
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help