@Override public void run() { // try { model[0] = handler.convertFromOWL(stream); // } catch (Throwable e) { // log.warn("Import failed: " + e); // } } }, com.ctc.wstx.stax.WstxInputFactory.class);
@Override public void run() { model[0] = (new SimpleIOHandler()).convertFromOWL(stream); } });
public static void main(String[] args) throws FileNotFoundException { SimpleIOHandler reader = new SimpleIOHandler(); Model model = reader.convertFromOWL(new FileInputStream( "/home/ozgun/Projects/biopax-pattern/All-Data.owl")); new ChemicalNameNormalizer(model); }
model = biopaxReader.convertFromOWL( new ByteArrayInputStream(biopaxOwlData.getBytes("UTF-8"))); } catch (UnsupportedEncodingException e) {
Model model = h.convertFromOWL(new FileInputStream(inFile));
public static void main(String[] args) throws IOException { // A blacklist file is available at http://www.pathwaycommons.org/pc2/downloads/blacklist.txt // This is for avoiding ubiquitous small molecules like ATP Blacklist black = new Blacklist("blacklist.txt"); DeltaFeatureExtractor dfe = new DeltaFeatureExtractor(); dfe.setBlacklist(black); SimpleIOHandler io = new SimpleIOHandler(); // The large model file is available at // http://www.pathwaycommons.org/pc2/downloads/Pathway%20Commons.5.Detailed_Process_Data.BIOPAX.owl.gz Model model = io.convertFromOWL(new FileInputStream( "Pathway Commons.5.Detailed_Process_Data.BIOPAX.owl")); dfe.mineAndCollect(model); dfe.writeResults("DeltaFeatures.txt"); }
model = io.convertFromOWL(new FileInputStream(modFile)); prgBar.setIndeterminate(false); prgBar.setStringPainted(true);
SimpleIOHandler io = new SimpleIOHandler(); io.mergeDuplicates(true); Model model = io.convertFromOWL(is); if (model.getLevel() != BioPAXLevel.L3) { if (log.isInfoEnabled())
public void importModel(Validation validation, InputStream inputStream) { // add the parser SimpleIOHandler simpleReader = new SimpleIOHandler(); simpleReader.mergeDuplicates(true); associate(inputStream, validation); associate(simpleReader, validation); /* * build a model and associate it with the validation (for post-validation later on); * during this, many errors/warnings may be caught and reported via AOP ;)) */ Model model = simpleReader.convertFromOWL(inputStream); if(model == null) throw new BiopaxValidatorException( "Failed importing a BioPAX model!"); associate(model, validation); }
public void importModel(Validation validation, InputStream inputStream) { // add the parser SimpleIOHandler simpleReader = new SimpleIOHandler(); simpleReader.mergeDuplicates(true); associate(inputStream, validation); associate(simpleReader, validation); /* * build a model and associate it with the validation (for post-validation later on); * during this, many errors/warnings may be caught and reported via AOP ;)) */ Model model = simpleReader.convertFromOWL(inputStream); if(model == null) throw new ValidatorException( "Failed importing a BioPAX model!"); associate(model, validation); }