public AbstractInteractionCluster(List<BinaryInteraction> binaryInteractionList){ String [] dbNames; if (mappingIdDbNames.contains(",")){ dbNames = mappingIdDbNames.split(","); } else { dbNames = new String [] {mappingIdDbNames}; } this.binary2Encore = new Binary2Encore(dbNames); this.binaryInteractionIterator = binaryInteractionList.iterator(); }
@Override public Map<Integer, EncoreInteraction> getEncoreInteractionCluster() { Binary2Encore iConverter = new Binary2Encore(); Map<Integer, EncoreInteraction> encoreInteractionCluster = new HashMap<Integer, EncoreInteraction>(); for(Integer mappingId:getBinaryInteractionCluster().keySet()){ BinaryInteraction bI = getBinaryInteractionCluster().get(mappingId); if (bI != null){ EncoreInteraction eI = iConverter.getEncoreInteractionForScoring(bI); encoreInteractionCluster.put(mappingId, eI); } } return encoreInteractionCluster; }
@Override protected EncoreInteraction convertEncoreInteractionFrom(BinaryInteraction interaction, String[] idDbNameList) { this.binary2Encore.setIdDbNameList(idDbNameList); return this.binary2Encore.getEncoreInteraction(interaction); }
@Override protected EncoreInteraction convertEncoreInteractionFrom(BinaryInteraction binaryInteraction, String[] strings) { this.binary2Encore.setIdDbNameList(strings); return binary2Encore.getEncoreInteractionForScoring(binaryInteraction); }
String sourceIdDbName = xref.getDatabase(); int firtSize = accs.size(); updateAccMap(accs, acc, idDbNameList, sourceIdDbName); int newSize = accs.size(); updateOtherAccMap(otherAccs, sourceIdDbName, acc); String sourceIdDbName = aXref.getDatabase(); int firtSize = accs.size(); updateAccMap(accs, acc, idDbNameList, sourceIdDbName); int newSize = accs.size(); updateOtherAccMap(otherAccs, sourceIdDbName, acc); String sourceIdDbName = alias.getDbSource(); int firtSize = accs.size(); updateAccMap(accs, acc, idDbNameList, sourceIdDbName); int newSize = accs.size(); updateOtherAccMap(otherAccs, sourceIdDbName, acc);
public EncoreInteraction getEncoreInteractionForScoring(BinaryInteraction binaryInteraction) { EncoreInteraction encoreInteraction = new EncoreInteraction(); String pubmed = convertEncoreInteraction(encoreInteraction, binaryInteraction); if (pubmed.length() > 0){ encoreInteraction.getDistinctPublications().add(pubmed);
public void setMappingIdDbNames( String mappingIdDbNames ) { if(mappingIdDbNames != null){ this.mappingIdDbNames = mappingIdDbNames; String [] dbNames; if (mappingIdDbNames.contains(",")){ dbNames = mappingIdDbNames.split(","); } else { dbNames = new String [] {mappingIdDbNames}; } this.binary2Encore.setIdDbNameList(dbNames); } else { logger.warn("mappingIdDbNames can not be null. Setting the default mappingIdDbNames: " + this.mappingIdDbNames); } }
EncoreIdentifiers interactorAccsA = getInteractorAccs(iA); encoreInteraction.setInteractorAccsA(interactorAccsA.getAccessions()); encoreInteraction.setOtherInteractorAccsA(interactorAccsA.getOtherAccessions()); Interactor iB = binaryInteraction.getInteractorB(); EncoreIdentifiers interactorAccsB = getInteractorAccs(iB); encoreInteraction.setInteractorAccsB(interactorAccsB.getAccessions()); encoreInteraction.setOtherInteractorAccsB(interactorAccsB.getOtherAccessions());
public EncoreInteraction getEncoreInteraction(BinaryInteraction binaryInteraction) { EncoreInteraction encoreInteraction = new EncoreInteraction(); String pubmed = convertEncoreInteraction(encoreInteraction, binaryInteraction); /* get all types for this interaction */ List<CrossReference> iTypes = binaryInteraction.getInteractionTypes(); for(CrossReference iType:iTypes){ encoreInteraction.addTypeToPubmed(iType.getIdentifier(), pubmed); } /* get all methods for this interaction */ List<CrossReference> iMethods = binaryInteraction.getDetectionMethods(); for(CrossReference iMethod:iMethods){ encoreInteraction.addMethodToPubmed(iMethod.getIdentifier(), pubmed); } return encoreInteraction; }
public AbstractInteractionCluster( Iterator<BinaryInteraction> iterator ) throws ClusterServiceException { if ( iterator == null ) { throw new IllegalArgumentException( "You must give a non null iterator" ); } this.binaryInteractionIterator = iterator; String [] dbNames; if (mappingIdDbNames.contains(",")){ dbNames = mappingIdDbNames.split(","); } else { dbNames = new String [] {mappingIdDbNames}; } this.binary2Encore = new Binary2Encore(dbNames); }
public AbstractInteractionCluster(int queryStart, int queryRange){ 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; } String [] dbNames; if (mappingIdDbNames.contains(",")){ dbNames = mappingIdDbNames.split(","); } else { dbNames = new String [] {mappingIdDbNames}; } this.binary2Encore = new Binary2Encore(dbNames); }
public AbstractInteractionCluster(String mappingIdDbNames){ this.queryStart = 0; this.queryRange = 200; this.binary2Encore = new Binary2Encore(); setMappingIdDbNames( mappingIdDbNames ); }
public AbstractInteractionCluster(List<BinaryInteraction> binaryInteractionList, String mappingIdDbNames){ this.binary2Encore = new Binary2Encore(); this.binaryInteractionIterator = binaryInteractionList.iterator(); setMappingIdDbNames( mappingIdDbNames ); }
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 AbstractInteractionCluster( Reader r, boolean hasHeader ) throws ClusterServiceException { if ( r == null ) { throw new IllegalArgumentException( "You must give a non null MITAB Reader" ); } String [] dbNames; if (mappingIdDbNames.contains(",")){ dbNames = mappingIdDbNames.split(","); } else { dbNames = new String [] {mappingIdDbNames}; } this.binary2Encore = new Binary2Encore(dbNames); final PsimiTabReader reader = new PsimiTabReader( ); try { this.binaryInteractionIterator = reader.iterate( r ); } catch ( Exception e ) { throw new ClusterServiceException( "An error occured while read MITAB data", e ); } }