Is random access by row index possible for an indexed VCF file?
1
0
Entering edit mode
maltethodberg ▴ 180
@maltethodberg-9690
Last seen 1 day ago
Denmark

Is it possible to import specific rows from an indexed VCF file with VariationAnnotation, without manually specifying the ranges?

I would simply like to do the following:

# Dummy file
library(VariantAnnotation)
fl <- system.file("extdata", "ex2.vcf", package="VariantAnnotation") 

# This read the entire matrix:
readGeno(fl, x="GT")

# Desired output is this, but without reading in the entire matrix in first:
readGeno(fl, x="GT")[c(1,3,5),]

I realise you can specify a ScanVcfParam argument, but that only takes ranges as input, and not rows directly.

Rsamtools VariantAnnotation • 401 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 17 hours ago
United States

No, the tabix file that is used for random access is based on genomic regions, not rows of the VCF file.

Login before adding your answer.

Traffic: 1011 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6