fstream.write(eI.getInteractorA()); fstream.write("-"); fstream.write(eI.getInteractorB()); fstream.write(":" + score); fstream.write("\n");
@Override public boolean canExportEncoreInteraction(EncoreInteraction encore, ExportContext context) throws UniprotExportException { double score = FilterUtils.getMiClusterScoreFor(encore); if (score >= positive_export_threshold){ if (encore.getExperimentToDatabase() == null){ throw new UniprotExportException("The interaction " + encore.getId() + ":" + encore.getInteractorA() + "-" + encore.getInteractorB() +" doesn't have any references to IntAct."); } Set<String> intactInteractions = new HashSet<String>(); intactInteractions.addAll(encore.getExperimentToPubmed().keySet()); if (intactInteractions.isEmpty()){ throw new UniprotExportException("The interaction " + encore.getId() + ":" + encore.getInteractorA() + "-" + encore.getInteractorB() +" doesn't have any references to IntAct."); } for (String ac : intactInteractions){ if (!context.getSpokeExpandedInteractions().contains(ac)){ String type = context.getInteractionToMethod_type().get(ac).getType(); if (!type.equals(COLOCALIZATION)){ logger.info("The interaction " + encore.getId() + " passed the export rules with score = " + score); return true; } } } } return false; }
@Override public boolean canExportNegativeEncoreInteraction(EncoreInteraction encore, ExportContext context, ExportedClusteredInteractions positiveInteractions) throws UniprotExportException { boolean isElgibleForExport = ExporterUtils.isNegativeInteractionEligibleForUniprotExport(encore, positiveInteractions); if (isElgibleForExport){ double score = FilterUtils.getMiClusterScoreFor(encore); if (score >= negative_export_threshold){ if (encore.getExperimentToDatabase() == null){ throw new UniprotExportException("The interaction " + encore.getId() + ":" + encore.getInteractorA() + "-" + encore.getInteractorB() +" doesn't have any references to IntAct."); } Set<String> intactInteractions = new HashSet<String>(); intactInteractions.addAll(encore.getExperimentToPubmed().keySet()); if (intactInteractions.isEmpty()){ throw new UniprotExportException("The interaction " + encore.getId() + ":" + encore.getInteractorA() + "-" + encore.getInteractorB() +" doesn't have any references to IntAct."); } for (String ac : intactInteractions){ if (!context.getSpokeExpandedInteractions().contains(ac)){ String type = context.getInteractionToMethod_type().get(ac).getType(); if (!type.equals(COLOCALIZATION)){ logger.info("The negative interaction " + encore.getId() + " passed the export rules with score = " + score); return true; } } } } } return false; }
EncoreInteraction eI = this.getInteractionMapping().get(interactionId); logger.debug("= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ="); logger.debug("IntA: "+ eI.getInteractorA() + " , IntB: " + eI.getInteractorB());
logger.error("No score for this interaction: " + eI.getId()); scoreList[i] = eI.getId() + "-" +eI.getInteractorA() + "-" + eI.getInteractorB() + ":" + score; scoreListCSV = scoreListCSV + scoreList[i]; i++;
List<CrossReference> psiIdentifierB= new ArrayList<CrossReference>(); List<CrossReference> psiAlternativeIdentifierB= new ArrayList<CrossReference>(); String encoreInteractorB = encoreInteraction.getInteractorB(mappingIdDbNames); Map<String,String> encoreInteractorAccsB = encoreInteraction.getInteractorAccsB(); updateIdentifiers(psiIdentifierB, psiAlternativeIdentifierB, encoreInteractorAccsB, encoreInteractorB);