A module to parse Variant Call Format (VCF) into JSON. An optional parameter allows to map the genomic coordinates to the protein coordinates using the UniProt Coordinates API.
npm i --save vcftojson
- fileContent:
- options
- runVEP: a boolean used to fetch additional data from VEP. VEP determines the effect of your variants (SNPs, insertions, deletions, CNVs or structural variants) on genes, transcripts, and protein sequence, as well as regulatory regions.
import {vcfToJSON} from 'vcftojson`;
const fileContent = await fs.readFileSync(
"./path_to/my_file.vcf",
{ encoding: "utf-8" } //if you don't provide this it will come as a Stream
);
const json = await vcfToJSON(fileContent);