public void setBinaryInteractionIterator(File file, boolean hasHeader) throws ClusterServiceException { final InputStream inputStream; try { inputStream = new FileInputStream(file); } catch (FileNotFoundException e) { throw new ClusterServiceException( "No file found", e ); } setBinaryInteractionIterator(inputStream, hasHeader); }
protected void setMappingForBinaryInteractions() { super.setMappingForBinaryInteractions(); }
protected void setMappingForPsicquic() { if(queryAccs.size() > 0 && querySources.size() > 0){ for(String queryAcc:queryAccs){ for(String querySource:querySources){ /* Run cluster service */ try { super.setMappingForPsicquic(queryAcc, querySource); } catch (IOException e) { logger.error("Problem setting mapping for PSICQUIC for query source: "+querySource, e); } } } } }
T encoreInteraction = convertEncoreInteractionFrom(interaction, idDbNameList); interactorAccA = getInteractorFromAccs(interactorAccsA, idDbNameList); interactorAccB = getInteractorFromAccs(interactorAccsB, idDbNameList); interactorAccA = getInteractorFromAccs(interactorAccsA, idDbNameList); interactorAccB = "-"; interactorAccB = getInteractorFromAccs(interactorAccsB, idDbNameList); interactorAccA = "-"; mappingEcoreInteraction = mergeWithExistingEncoreInteraction(encoreInteraction, interactionIdFound);
public void runService(){ if(interactionMapping == null){ if(ClusterContext.getInstance().getCacheManager().getInteractionCache().size() > 0){ logger.error("ERROR: CACHE PROBLEM. InteractionCache HAS NOT BEEN RESET"); } interactionMapping = ClusterContext.getInstance().getCacheManager().getInteractionCache(); } if(interactorMapping == null){ if(ClusterContext.getInstance().getCacheManager().getInteractorCache().size() > 0){ logger.error("ERROR: CACHE PROBLEM. InteractorCache HAS NOT BEEN RESET"); } interactorMapping = ClusterContext.getInstance().getCacheManager().getInteractorCache(); } if(synonymMapping == null){ if(ClusterContext.getInstance().getCacheManager().getSynonymCache().size() > 0){ logger.error("ERROR: CACHE PROBLEM. SynonymCache HAS NOT BEEN RESET"); } synonymMapping = ClusterContext.getInstance().getCacheManager().getSynonymCache(); } setMappingForPsicquic(); setMappingForBinaryInteractions(); }
public AbstractInteractionCluster(String mappingIdDbNames){ this.queryStart = 0; this.queryRange = 200; this.binary2Encore = new Binary2Encore(); setMappingIdDbNames( mappingIdDbNames ); }
protected void setMappingForBinaryInteractions(){ if(binaryInteractionIterator != null){ String[] idDbNameList = mappingIdDbNames.split(","); while ( binaryInteractionIterator.hasNext() ) { BinaryInteraction binaryInteraction = binaryInteractionIterator.next(); setMappings(binaryInteraction, idDbNameList); } } }
mappingEcoreInteraction.addExperimentToPubmed(encoreInteraction.getExperimentToPubmed()); mappingEcoreInteraction.addExperimentToDatabase(encoreInteraction.getExperimentToDatabase()); processMethodAndType(encoreInteraction, mappingEcoreInteraction); mappingEcoreInteraction.addAuthors(encoreInteraction.getAuthors()); mappingEcoreInteraction.addConfidenceValues(encoreInteraction.getConfidenceValues());
public AbstractInteractionCluster(List<BinaryInteraction> binaryInteractionList, String mappingIdDbNames){ this.binary2Encore = new Binary2Encore(); this.binaryInteractionIterator = binaryInteractionList.iterator(); setMappingIdDbNames( mappingIdDbNames ); }
queryCount++; for (BinaryInteraction interaction : searchResult) { setMappings(interaction, idDbNameList);
public AbstractInteractionCluster(int queryStart, int queryRange, String mappingIdDbNames){ this.queryStart = queryStart; if(queryRange > 200){ logger.warn( "You have set a query range of " + queryRange + " while the maximum supported is 200. Setting it back to 200." ); this.queryRange = 200; } else { this.queryRange = queryRange; } this.binary2Encore = new Binary2Encore(); setMappingIdDbNames( mappingIdDbNames ); }
public void setBinaryInteractionIterator(File[] files, boolean hasHeader) throws ClusterServiceException { List<InputStream> streams = new ArrayList<InputStream>( ); for(File file:files){ try { streams.add( new FileInputStream( file ) ); } catch (FileNotFoundException e) { throw new ClusterServiceException( "No file found", e ); } } final InputStream inputStream; try { inputStream = new CompositeInputStream( streams.iterator() ); } catch (IOException e) { throw new ClusterServiceException( "Input error", e ); } setBinaryInteractionIterator(inputStream, hasHeader); }
@Override protected void setMappingForPsicquic() { if(queryAccs.size() > 0 && querySources.size() > 0){ for(String queryAcc:queryAccs){ for(String querySource:querySources){ /* Run cluster service */ try { super.setMappingForPsicquic(queryAcc, querySource); } catch (IOException e) { e.printStackTrace(); } } } } }