Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScanVcfParam which Parameter Description Inconsistency #34

Open
DarioS opened this issue Oct 22, 2019 · 2 comments
Open

ScanVcfParam which Parameter Description Inconsistency #34

DarioS opened this issue Oct 22, 2019 · 2 comments

Comments

@DarioS
Copy link

DarioS commented Oct 22, 2019

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
Copy link
Contributor

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
Copy link
Author

DarioS commented Oct 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants