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(); }
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 ); }
@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; }
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 ); } }