This is a test version of Biostars. For the public version, visit https://www.biostars.org.
What's the best way to serve VCF data on web?

I would like to know what is the best strategy to store VCF data and serve on the web. So far, it seems like I have two options but I don't know the limitations and negative sides of these options:

  1. Stream from VCF
  2. Store data in DB such as Postgres

Considering there will be thousands of VCFs, what should be done?

Thanks!

vcf web database postgres

2 answers

I don't know if it will fullfill your needs, I wrote a basic bam+vcf file server. It's currently in the dev branch of jvarkit: https://github.com/lindenb/jvarkit/blob/dev/docs/HtsFileServer.md

java -jar dist/htsfileserver.jar -R src/test/resources/rotavirus_rf.fa src/test/resources/S*.bam  src/test/resources/rotavirus_rf.*.vcf.gz

enter image description here

Considering there will be thousands of VCFs,

Will your solution scale to that level?

as I said, it's pretty basic.

pro: should work out of the box (no sql...)

con: there will be thousands of lines in the html page

let me be clear: it's a FILE server, not a tool to query VCFs...

htsget is the API for serving SAM/BAM/VCF over HTTP, but support is currently limited as it is a relatively new standard.

Log in to answer this question.