All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.monarchinitiative.phenol.io.obo.uberpheno.UberphenoOboParser Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
//package org.monarchinitiative.phenol.io.obo.uberpheno;
//
//import org.monarchinitiative.phenol.io.obo.OboOntologyLoader;
//import org.monarchinitiative.phenol.ontology.data.Ontology;
//
//import java.io.File;
//import java.util.Optional;
//
//public class UberphenoOboParser {
//
//  private final File oboFile;
//
//  private final boolean debug;
//
//  public UberphenoOboParser(File oboFile, boolean debug) {
//    this.oboFile = oboFile;
//    this.debug = debug;
//  }
//  public UberphenoOboParser(File oboFile) {
//    this(oboFile,false);
//  }
//
//  public Ontology parse() {
//    Ontology ontology;
//    final OboOntologyLoader loader = new OboOntologyLoader(oboFile);
//    Optional optOnto = loader.load();
//    if (! optOnto.isPresent()) {
//      System.err.println("[ERROR] Failed to load ontology");
//      return null; // TODO return optional.
//    } else {
//      ontology = optOnto.get();
//    }
//    if (debug) {
//      System.err.println(String.format("Parsed a total of %d MP terms",ontology.countAllTerms()));
//    }
//    return ontology;
//  }
//
//}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy