Hi,
HTSLIB 1.5 and 1.8 both have a bug in tabix. It ignores the option for
0-based input files.
Example: I have a vcf with two consecutive variants
chr22 17491115 . C T 1189.33 PASS [...]
chr22 17491116 . G A 16942.9 PASS [...]
I have a bed file requesting these 2 entries:
chr22 17491114 17491115
chr22 17491115 17491116
Using tabix -0 -R returns 3 entries. One snp (17491115) for the first bed
line (17491114-17491115) and two (17491115 & 17491116) for the second bed
line:
$tabix -0 vcf -R <(echo -e
"chr22\t17491114\t17491115\nchr22\t17491115\t17491116") | awk -v OFS="\t"
'{print $1,$2,$3,$4,$5,$6,$7}'
chr22 17491115 . C T 1189.33 PASS
chr22 17491115 . C T 1189.33 PASS
chr22 17491116 . G A 16942.9 PASS
Changing the placement of the -0 parameter makes no change.
The result is the same as if using no -0 option:
$tabix vcf -R <(echo -e
"chr22\t17491114\t17491115\nchr22\t17491115\t17491116") | awk -v OFS="\t"
'{print $1,$2,$3,$4,$5,$6,$7}'
chr22 17491115 . C T 1189.33 PASS
chr22 17491115 . C T 1189.33 PASS
chr22 17491116 . G A 16942.9 PASS
The second position returns two variants with/without -0, even when giving
the positions as string:
$tabix -0 vcf chr22:17491115-17491116 | awk -v OFS="\t" '{print
$1,$2,$3,$4,$5,$6,$7}'
chr22 17491115 . C T 1189.33 PASS
chr22 17491116 . G A 16942.9 PASS
$ tabix vcf chr22:17491115-17491116 | awk -v OFS="\t" '{print
$1,$2,$3,$4,$5,$6,$7}'
chr22 17491115 . C T 1189.33 PASS
chr22 17491116 . G A 16942.9 PASS
Cheers,
Txema
------------------------------------------------------------------------------
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