Skip to content
Pierre Lindenbaum edited this page Mar 9, 2015 · 7 revisions

Motivation

Generate the SQL code to insert a VCF into mysql. http://www.sqlite.org/

Compilation

See also Compilation

$ make vcf2sql

##Synopsis

$ java -jar dist/vcf2sql.jar file.vcf

##Options

Option Description
-h get help (this screen) and exit.
-v print version and exit.
-L (level) log level. One of java.util.logging.Level . Optional.

Examples

java -jar dist/vcf2sql.jar  file.vcf | mysql -u user -p -D vcf_db 

Database schema (dot)

digraph G{
vcffile;
sample;
sample2file;
allele;
filter;
chromosome;
variant;
variant2alt;
variant2filter;
vepPrediction;
vepPrediction2so;
genotype;
sample2file -> vcffile[label=vcffile_id];
sample2file -> sample[label=sample_id];
filter -> vcffile[label=vcffile_id];
chromosome -> vcffile[label=vcffile_id];
variant -> vcffile[label=vcffile_id];
variant -> chromosome[label=chromosome_id];
variant -> allele[label=ref_id];
variant2alt -> variant[label=variant_id];
variant2alt -> allele[label=alt_id];
variant2filter -> variant[label=variant_id];
variant2filter -> filter[label=filter_id];
vepPrediction -> variant[label=variant_id];
vepPrediction2so -> vepPrediction[label=vepPrediction_id];
genotype -> variant[label=variant_id];
genotype -> sample[label=sample_id];
genotype -> allele[label=a1_id];
genotype -> allele[label=a2_id];
}

See also

Contribute

##History

  • 2015 : moved code to mysql. Need to work on this.
  • 2014 : Creation

License

The project is licensed under the MIT license.

Clone this wiki locally