Search in sources :

Example 1 with HPOParser

use of org.monarchinitiative.loinc2hpo.io.HPOParser in project loinc2hpo by monarch-initiative.

the class FhirObservationParserTest method setup.

@BeforeClass
public static void setup() throws IOException {
    ClassLoader classLoader = FhirObservationParserTest.class.getClassLoader();
    String obopath = classLoader.getResource("obo/hp.obo").getFile();
    String loincpath = classLoader.getResource("loinc2hpoAnnotationTest.tsv").getFile();
    HPOParser parser = new HPOParser(obopath);
    HpoOntology ontology = parser.getHPO();
    loincparser = new FromFile(loincpath, ontology);
    testmap = loincparser.getTestmap();
    String fhirPath = classLoader.getResource("json/glucoseHigh.fhir").getFile();
    ObjectMapper mapper = new ObjectMapper();
    File f = new File(fhirPath);
    FileInputStream fis = new FileInputStream(f);
    byte[] data = new byte[(int) f.length()];
    fis.read(data);
    fis.close();
    node = mapper.readTree(data);
}
Also used : FromFile(org.monarchinitiative.loinc2hpo.io.FromFile) HpoOntology(com.github.phenomics.ontolib.formats.hpo.HpoOntology) FromFile(org.monarchinitiative.loinc2hpo.io.FromFile) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HPOParser(org.monarchinitiative.loinc2hpo.io.HPOParser) BeforeClass(org.junit.BeforeClass)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 HpoOntology (com.github.phenomics.ontolib.formats.hpo.HpoOntology)1 BeforeClass (org.junit.BeforeClass)1 FromFile (org.monarchinitiative.loinc2hpo.io.FromFile)1 HPOParser (org.monarchinitiative.loinc2hpo.io.HPOParser)1