Search in sources :

Example 1 with Loinc2HpoAnnotation

use of org.monarchinitiative.loinc2hpocore.annotation.Loinc2HpoAnnotation in project loinc2hpo by monarch-initiative.

the class AnnotationQcCommand method run.

@Override
public void run() {
    System.out.println(annotPath);
    Loinc2HpoAnnotationParser parser = new Loinc2HpoAnnotationParser(annotPath);
    List<Loinc2HpoAnnotation> entries = parser.getEntries();
    System.out.println("[INFO] Got " + entries.size() + " LOINC annotations.");
    Ontology ontology = OntologyLoader.loadOntology(new File(hpJsonPath));
    System.out.println("[INFO] Got " + ontology.countNonObsoleteTerms() + " HPO terms in hp.json.");
    checkValidityOfHpoTerms(entries, ontology);
    Map<LoincId, LoincAnnotation> mymap = parser.loincToHpoAnnotationMap();
    System.out.println("[INFO] " + mymap.size() + " annotated LOINC terms");
    checkValidityOfLoincAnnotations(mymap);
}
Also used : Ontology(org.monarchinitiative.phenol.ontology.data.Ontology) Loinc2HpoAnnotation(org.monarchinitiative.loinc2hpocore.annotation.Loinc2HpoAnnotation) LoincId(org.monarchinitiative.loinc2hpocore.loinc.LoincId) Loinc2HpoAnnotationParser(org.monarchinitiative.loinc2hpocore.io.Loinc2HpoAnnotationParser) LoincAnnotation(org.monarchinitiative.loinc2hpocore.annotation.LoincAnnotation) File(java.io.File)

Aggregations

File (java.io.File)1 Loinc2HpoAnnotation (org.monarchinitiative.loinc2hpocore.annotation.Loinc2HpoAnnotation)1 LoincAnnotation (org.monarchinitiative.loinc2hpocore.annotation.LoincAnnotation)1 Loinc2HpoAnnotationParser (org.monarchinitiative.loinc2hpocore.io.Loinc2HpoAnnotationParser)1 LoincId (org.monarchinitiative.loinc2hpocore.loinc.LoincId)1 Ontology (org.monarchinitiative.phenol.ontology.data.Ontology)1