Bioconductor / VariantAnnotation

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

Can I read in a VCF "file" as a character string? #28

Open tcashby opened 5 years ago

tcashby commented 5 years ago

First off, thanks for an excellent tool.

This is a bit of a niche issue, but I was wondering is it possible to pass readVCF a character string instead of a filename?

I have a database in which VCF files have been inserted as a blob variable. My current implementation:

  1. Reads the VCF character string from the database
  2. Writes it to a tempfile
  3. Passes the tempfile to readVCF to create a CollapsedVCF object
  4. Deletes the temp file

For the most part, this isn't too much of a performance hit, but I have some 100+ mb VCF files in which the file i/o takes longer than I would like. If I could go directly from character string to CollapsedVCF it would be much more efficient.

vobencha commented 5 years ago

Hi @tcashby , Unfortunately I don't have time to work on new requests right now. Maybe someone in the community would be interested in submitting a patch. Valerie