@Test @Ignore public void testOldFormatWriter() throws FileNotFoundException { SIFSearcher s = new SIFSearcher(SIFEnum.CONTROLS_STATE_CHANGE_OF, SIFEnum.IN_COMPLEX_WITH); SimpleIOHandler handler = new SimpleIOHandler(); Model model = handler.convertFromOWL(new FileInputStream("/home/ozgun/Desktop/AR.TP53.owl")); Set<SIFInteraction> sif = s.searchSIF(model); ExtendedSIFWriter.write(sif, new FileOutputStream("temp.sif")); s.searchSIF(model, new FileOutputStream("output.sif")); }
public Set<SIFInteraction> searchSIF(final Model model) { if (miners == null) initMiners(); final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>(); for (final SIFMiner miner : miners) { if (miner instanceof MinerAdapter) ((MinerAdapter) miner).setIdMap(new HashMap<BioPAXElement, Set<String>>()); Map<BioPAXElement,List<Match>> matches = Searcher.search(model, miner.getPattern()); for (final List<Match> matchList : matches.values()) { for (Match m : matchList) { Set<SIFInteraction> sifs = miner.createSIFInteraction(m, idFetcher); for (SIFInteraction sif : sifs) { if ( sif != null && sif.hasIDs() && !sif.sourceID.equals(sif.targetID) && (types == null || types.contains(sif.type)) ) { SIFInteraction existing = map.get(sif); if(existing != null) existing.mergeWith(sif); else map.put(sif, sif); } } } } } return new HashSet<SIFInteraction>(map.values()); }
SIFSearcher { public Set<SIFInteraction> searchSIF(final Model model) { if (miners == null) initMiners(); final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>(); for (final SIFMiner miner : miners) { if (miner instanceof MinerAdapter) ((MinerAdapter) miner).setIdMap(new HashMap<BioPAXElement, Set<String>>()); Map<BioPAXElement,List<Match>> matches = Searcher.search(model, miner.getPattern()); for (final List<Match> matchList : matches.values()) { for (Match m : matchList) { Set<SIFInteraction> sifs = miner.createSIFInteraction(m, idFetcher); for (SIFInteraction sif : sifs) { if ( sif != null && sif.hasIDs() && !sif.sourceID.equals(sif.targetID) && (types == null || types.contains(sif.type)) ) { SIFInteraction existing = map.get(sif); if(existing != null) existing.mergeWith(sif); else map.put(sif, sif); } } } } } return new HashSet<SIFInteraction>(map.values()); } }
SIFSearcher { public Set<SIFInteraction> searchSIF(final Model model) { if (miners == null) initMiners(); final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>(); for (final SIFMiner miner : miners) { if (miner instanceof MinerAdapter) ((MinerAdapter) miner).setIdMap(new HashMap<BioPAXElement, Set<String>>()); Map<BioPAXElement,List<Match>> matches = Searcher.search(model, miner.getPattern()); for (final List<Match> matchList : matches.values()) { for (Match m : matchList) { Set<SIFInteraction> sifs = miner.createSIFInteraction(m, idFetcher); for (SIFInteraction sif : sifs) { if ( sif != null && sif.hasIDs() && !sif.sourceID.equals(sif.targetID) && (types == null || types.contains(sif.type)) ) { SIFInteraction existing = map.get(sif); if(existing != null) existing.mergeWith(sif); else map.put(sif, sif); } } } } } return new HashSet<SIFInteraction>(map.values()); } SIFSearcher(SIFType... types);  SIFSearcher(SIFMiner... miners);  SIFSearcher(IDFetcher idFetcher, SIFType... types);  SIFSearcher(IDFetcher idFetcher, SIFMiner... miners); }
SIFSearcher { public Set<SIFInteraction> searchSIF(final Model model) { if (miners == null) initMiners(); final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>(); for (final SIFMiner miner : miners) { if (miner instanceof MinerAdapter) ((MinerAdapter) miner).setIdMap(new HashMap<BioPAXElement, Set<String>>()); Map<BioPAXElement,List<Match>> matches = Searcher.search(model, miner.getPattern()); for (final List<Match> matchList : matches.values()) { for (Match m : matchList) { Set<SIFInteraction> sifs = miner.createSIFInteraction(m, idFetcher); for (SIFInteraction sif : sifs) { if ( sif != null && sif.hasIDs() && !sif.sourceID.equals(sif.targetID) && (types == null || types.contains(sif.type)) ) { SIFInteraction existing = map.get(sif); if(existing != null) existing.mergeWith(sif); else map.put(sif, sif); } } } } } return new HashSet<SIFInteraction>(map.values()); } SIFSearcher(SIFType... types);  SIFSearcher(SIFMiner... miners);  SIFSearcher(IDFetcher idFetcher, SIFType... types);  SIFSearcher(IDFetcher idFetcher, SIFMiner... miners); void setBlacklist(Blacklist blacklist); AdjacencyMatrix searchSIFGetMatrix(Model model); Set<SIFInteraction> searchSIF(final Model model); boolean searchSIF(Model model, OutputStream out); boolean searchSIF(Model model, OutputStream out, SIFToText stt); }
SIFSearcher { public Set<SIFInteraction> searchSIF(final Model model) { if (miners == null) initMiners(); final Map<SIFInteraction, SIFInteraction> map = new ConcurrentHashMap<SIFInteraction, SIFInteraction>(); for (final SIFMiner miner : miners) { if (miner instanceof MinerAdapter) ((MinerAdapter) miner).setIdMap(new HashMap<BioPAXElement, Set<String>>()); Map<BioPAXElement,List<Match>> matches = Searcher.search(model, miner.getPattern()); for (final List<Match> matchList : matches.values()) { for (Match m : matchList) { Set<SIFInteraction> sifs = miner.createSIFInteraction(m, idFetcher); for (SIFInteraction sif : sifs) { if ( sif != null && sif.hasIDs() && !sif.sourceID.equals(sif.targetID) && (types == null || types.contains(sif.type)) ) { SIFInteraction existing = map.get(sif); if(existing != null) existing.mergeWith(sif); else map.put(sif, sif); } } } } } return new HashSet<SIFInteraction>(map.values()); } SIFSearcher(SIFType... types);  SIFSearcher(SIFMiner... miners);  SIFSearcher(IDFetcher idFetcher, SIFType... types);  SIFSearcher(IDFetcher idFetcher, SIFMiner... miners); void setBlacklist(Blacklist blacklist); AdjacencyMatrix searchSIFGetMatrix(Model model); Set<SIFInteraction> searchSIF(final Model model); boolean searchSIF(Model model, OutputStream out); boolean searchSIF(Model model, OutputStream out, SIFToText stt);  }