Skip to content
Permalink
Browse files

lovd example added

  • Loading branch information...
VarioML committed Dec 29, 2017
1 parent 059af90 commit bb92566236ca5c7bd4417a95d08afc9e7f17b377
Showing with 22 additions and 15 deletions.
  1. +1 −0 README.md
  2. +11 −2 src/main/java/examples/Example.java
  3. +10 −13 xml/nemdb/examples/example2.xml
@@ -1,5 +1,6 @@
VarioML
=======

VarioML is a XML/RelaxNG based framework which can be used as a template for developing serialization
formats for variation data focusing on the LSDB (Locus Specific Mutation Database) use cases. Translations
for JSON and EXI are supported using [Jackson](https://github.com/FasterXML/jackson) and
@@ -1,9 +1,11 @@
package examples;

import java.io.FileInputStream;
import java.net.URL;

import org.varioml.jaxb.CafeVariome;
import org.varioml.jaxb.Frequency;
import org.varioml.jaxb.Lsdb;
import org.varioml.jaxb.Vreport;
import org.varioml.util.Util;

@@ -19,12 +21,17 @@ public static void main(String[] args) throws Exception {

Util u = new Util();

/* LOVD example */
Lsdb lsdb = (Lsdb) u.readXML("xml/xsd/cafe_variome.xsd","xml/lsdb_main/examples/lovd_example.xml", Lsdb.class);
u.writeJSON("lovd.json", lsdb);



/* CafeVariome examples */
URL url1 = new URL(
"https://raw.github.com/VarioML/VarioML/master/xml/cafe_variome/examples/alamut_example.xml");
URL url2 = new URL(
"https://raw.github.com/VarioML/VarioML/master/xml/cafe_variome/examples/cafe_variome_example.xml");

/* CafeVariome example */
CafeVariome cv1 = (CafeVariome) u.readXML("xml/xsd/cafe_variome.xsd", url1.openStream(), CafeVariome.class);
u.writeJSON("alamut_example.json", cv1);
CafeVariome cv2 = (CafeVariome) u.readXML("xml/xsd/cafe_variome.xsd", url2.openStream(), CafeVariome.class);
@@ -42,7 +49,9 @@ public static void main(String[] args) throws Exception {

/* Generate JSON schema for the json editor. https://github.com/jdorn/json-editor*/
u.toJSONSchemaHtml5Enabled("vreport.json-schema-html5", Vreport.class);




}
}
@@ -10,23 +10,20 @@
<panel>
<population type="ethnic" term="Yorubans"/>
<population type="region" term="Nigeria"/>
<variant>
<gene accession="CYP3A5"/>
<ref_seq accession="NM_000777"/>
<name>g.6986A>G</name>
<frequency samples="50" type="allele">
<freq>0.06</freq>
</frequency>
<db_xref source="dbsnp" accession="rs776746"/>
<comment term="name">
<text>CYP3A5*3</text>
</comment>
</variant>
<variant_group orientation="cis">
<variant>
<name>g.12355A>G</name>
</variant>
<variant>
<name>g.12311A>G</name>
</variant>

</variant_group>
</panel>
<panel>
<population type="ethnic" term="Yorubans"/>
<population type="region" term="Nigeria"/>
<variant>
<variant >
<ref_seq accession="NM_000777"/>
<name>g.6986A>G</name>
<frequency samples="50" type="allele">

0 comments on commit bb92566

Please sign in to comment.
You can’t perform that action at this time.