private void clearExperimentDetails(){ if (this.binaryTemplate != null){ this.binaryTemplate.setDetectionMethods(new ArrayList<CrossReference>()); this.binaryTemplate.setHostOrganism(new OrganismImpl()); } } }
bI.setSourceDatabases(encoreInteraction.getSourceDatabases()); bI.setConfidenceValues(encoreInteraction.getConfidenceValues()); bI.setDetectionMethods(psiDetectionMethods); bI.setInteractionTypes(psiInteractionTypes); bI.setPublications(encoreInteraction.getPublicationIds());
bi.setDetectionMethods(detections);
bI.setSourceDatabases(encoreInteraction.getSourceDatabases()); bI.setConfidenceValues(encoreInteraction.getConfidenceValues()); bI.setDetectionMethods(psiDetectionMethods); bI.setInteractionTypes(psiInteractionTypes); bI.setPublications(encoreInteraction.getPublicationIds());
private void copyPublicationAndExperimentDetailsTo(BinaryInteraction binary, boolean isFirst, Experiment exp){ if (binary != null && this.binaryTemplate != null){ // we override all the shared collections of the expanded binary interactions excepted annotations (can come from publication and interactions) // experiment details binary.setDetectionMethods(binaryTemplate.getDetectionMethods()); binary.setHostOrganism(binaryTemplate.getHostOrganism()); if (binary.getInteractorA() != null && binary.getInteractorA().getParticipantIdentificationMethods().isEmpty()){ experimentConverter.addParticipantDetectionMethodForInteractor(exp, binary.getInteractorA()); } if (binary.getInteractorB() != null && binary.getInteractorB().getParticipantIdentificationMethods().isEmpty()){ experimentConverter.addParticipantDetectionMethodForInteractor(exp, binary.getInteractorB()); } // publication details binary.setPublications(binaryTemplate.getPublications()); binary.setAuthors(binaryTemplate.getAuthors()); binary.setSourceDatabases(binaryTemplate.getSourceDatabases()); binary.setCreationDate(binaryTemplate.getCreationDate()); // we don't need to update all the interactions as they all share the same annotation collection if (isFirst){ binary.getAnnotations().addAll(binaryTemplate.getAnnotations()); } } }
public BinaryInteraction createInteractionRandom() { BinaryInteraction bi = buildInteraction( createProteinInteractorRandom(), createProteinInteractorRandom() ); CrossReference source = pickRandom( sourceDatabases ); bi.setAuthors( createList( createAuthorRandom() ) ); bi.setConfidenceValues( createList( createConfidenceRandom() ) ); bi.setDetectionMethods( createList( createInteractionDetectionMethodRandom() ) ); bi.setInteractionAcs( createList( createCrossReference( source.getDatabase(), source.getText() + nextId() ) ) ); bi.setInteractionTypes( createList( createInteractionTypeRandom() ) ); bi.setPublications( createList( createCrossReference( "pubmed", String.valueOf( boundRandom( 100000, 999999 ) ) ) ) ); bi.setSourceDatabases( createList( source ) ); return bi; }
expandedInteraction.setDetectionMethods(interaction.getDetectionMethods()); expandedInteraction.setHostOrganism(interaction.getHostOrganism()); expandedInteraction.setInteractionAcs(interaction.getInteractionAcs());
interaction.setDetectionMethods(splitCrossReferences(line[PsimiTabColumns.INT_DET_METHOD.ordinal()])); interaction.setAuthors(splitAuthor(line[PsimiTabColumns.PUB_AUTH.ordinal()])); interaction.setPublications(splitCrossReferences(line[PsimiTabColumns.PUB_ID.ordinal()]));