-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hello,
Thanks for the software - it was a bit difficult to get running, though. I thought I'd post this minimal Groovy example here, in case you'd like to include it in the README, or in case anyone else tries to run it and could use a hand. Also fixes a couple of issues/omissions from the Java version.
@Grapes([
@GrabResolver(name='compbio', root='http://compbio.charite.de/tl_files/maven'),
@Grab(group='annotation-simulation', module='annotation-simulation', version='0.0.1-SNAPSHOT'),
@Grab(group='phenologizer', module='phenologizer', version='0.0.4-SNAPSHOT'),
@GrabConfig(systemClassLoader=true)
])
import drseb.*
import ontologizer.ontology.*
import hpo.ItemId.ItemDatabase;
import groovy.json.*
// Parameters
def ontologyFile = './hp.obo'
def annotationFile = './phenotype_annotation.tab'
def id = "114030";
// Generate patients
def simulator = new AnnotationSimulator(ontologyFile, annotationFile, OntologyProjectType.HPO);
def patients = simulator.simulatePatients(ItemDatabase.OMIM, id, 1000, 0.2, 0.4, 2, 10);
// Output
def json = JsonOutput.toJson(patients)
new File('patients.json').write(json)
println 'done'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels