I'll give it a try!

Thank you

2018-04-17 16:24 GMT+02:00 John Marshall <john.w.marsh...@glasgow.ac.uk>:

> On 17 Apr 2018, at 14:40, Heredia Genestar, Txema <txema.here...@upf.edu>
> wrote:
> > After further reading the documentation I've finally found the part
> where it explains the -0 option.
> >
> > I was mistaken and the -0 option is not there if you fancy one or
> another indexing. It is there for the ¿rare? cases where your vcf file data
> is written using 0-based positions and you need proper indexing.
>
> Recall that tabix is capable of indexing arbitrary one-record-per-line
> text genomics formats. So -0 is really there alongside -b -e etc so that
> you can fully describe file formats that use UCSC-style 0-based
> coordinates. For example, -p bed is more-or-less equivalent to -s 1 -b 2 -e
> 3 -0.
>
> Incidentally, old tabix 0.2.5's -0 option also applied only when indexing.
>
> > As it stands now, I cannot use tabix and I have to parse those big vcfs
> with awk. Is there any version without the -h bug that still has the -B
> option?
>
> The old tabix's -B option simply read a BED file. The new tabix's (and
> various bcftools commands') -R option has this crazy thing where it decides
> whether the file given is a standard BED file or a file that looks the same
> but contains 1-based coordinates. It seems to me that for sanity's sake new
> tabix will need to regain an option that just takes a BED file, whether
> that would be -B FILE, -0 -R FILE, or a somewhat incompatible -R option
> with less "smarts".
>
> In the meantime, you might like to apply the change below (to current
> HTSlib tabix), which will give you a tabix command whose -R option always
> interprets its argument as a standard BED file.
>
>     John
>
> --- a/tabix.c
> +++ b/tabix.c
> @@ -100,7 +100,7 @@ static char **parse_regions(char *regions_fname, char
> **argv, int argc, int *nre
>      {
>          // improve me: this is a too heavy machinery for parsing
> regions...
>
> -        regidx_t *idx = regidx_init(regions_fname, NULL, NULL, 0, NULL);
> +        regidx_t *idx = regidx_init(regions_fname, regidx_parse_bed,
> NULL, 0, NULL);
>          if ( !idx ) error("Could not read %s\n", regions_fname);
>
>          (*nregs) += regidx_nregs(idx);
>
>
------------------------------------------------------------------------------
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

Reply via email to