devtools::install_github('seandavi/VCFWrenchR')
Read in a VCF file using VariantAnnotation.
library(VariantAnnotation)
vcffile = system.file(package='VariantAnnotation',path='extdata/chr22.vcf.gz')
v = readVcf(vcffile,'hg19')
head(v)
````
## Convert to data.frame
```{r}
head(as.data.frame(v))
as.json(head(v,2),pretty=TRUE)
con = tempfile()
jsonlite::stream_out(as.data.frame(v),con)
close(con)
jq
and ElasticSearchTODO: Do this in R....
# assumes jq installed
cat abc.json | \
jq -c '. | {"index": {"_index": "variants", "_type": "variant"}}, .' | \
curl -XPOST localhost:9200/_bulk --data-binary @-
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.