Bioconductor / VariantAnnotation

Annotation of Genetic Variants
https://bioconductor.org/packages/VariantAnnotation
23 stars 20 forks source link

ScanVcfParam which Parameter Description Inconsistency #34

Open DarioS opened 4 years ago

DarioS commented 4 years ago

It is defined as

A GRanges describing the sequences and ranges to be queried.

But, in the constructor of ScanVcfParam

The ‘which’ argument to the constructor can be one of several types, as documented above.

I am hoping that it's possible to import the first few records using a setting such as which = 1:100 before importing the entire 250 GB gnomAD VCF file to check I've got what I need for an analysis.

mtmorgan commented 4 years ago

I'm not sure that I understand. I believe the which= argument specifies genomic ranges to be queried, rather than ranges of the file to input. If you want to read the first 100 records, use something like

fl <- system.file("extdata", "chr7-sub.vcf.gz", package="VariantAnnotation")
vcffile <- VcfFile(fl, yieldSize = 100)
open(vcffile)
dim(readVcf(vcffile))
## read the next 100 w/ readVcf(vcffile)
## or close(vcfile)
DarioS commented 4 years ago

I think the Arguments section restricts the variable type to be GRanges but the Constructor section suggests it could be one of a variety of types.