drseb / annotation-simulation Goto Github PK
View Code? Open in Web Editor NEWCode to generate ontology annotated objects (e.g. HPO annotated patients)
License: GNU General Public License v3.0
Code to generate ontology annotated objects (e.g. HPO annotated patients)
License: GNU General Public License v3.0
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'
@drseb where can I get it?
I get the error:
Exception in thread "main" java.lang.NoSuchMethodError: ontologizer.go.OBOParser.getDataVersion()Ljava/lang/String;
at hpo.HpoDataProvider.parseOntology(HpoDataProvider.java:254)
at hpo.HpoDataProvider.parseOntologyAndAssociations(HpoDataProvider.java:183)
at drseb.AnnotationSimulator.<init>(AnnotationSimulator.java:42)
at de.charite.compbio.exomiserbenchmark.Main.initialize(Main.java:117)
at de.charite.compbio.exomiserbenchmark.Main.main(Main.java:94)
I think I do not use the latest version of javautil_pheno
For debugging it is important that the simulator uses seeds to generate the exact same results if a seed is used!
like:
public AnnotationSimulator(ontologyFile, annotationFile, OntologyProjectType.HPO, seed); {
this.seed = seed;
//etc
}
public AnnotationSimulator(ontologyFile, annotationFile, OntologyProjectType.HPO); {
AnnotationSimulator(ontologyFile, annotationFile, OntologyProjectType.HPO, new Random().nextInt())
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.