GithubHelp home page GithubHelp logo

drseb / annotation-simulation Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 3.22 MB

Code to generate ontology annotated objects (e.g. HPO annotated patients)

License: GNU General Public License v3.0

Java 100.00%
hpo patients simulation phenotype hpo-annotated-patients phenotypes phenotyping phenotype-ontologies

annotation-simulation's People

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

visze

annotation-simulation's Issues

minimal example in groovy

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'

javautil_pheno

@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

seed

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())
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.