private void clearExperimentDetails(){ if (this.binaryTemplate != null){ this.binaryTemplate.setDetectionMethods(new ArrayList<CrossReference>()); this.binaryTemplate.setHostOrganism(new OrganismImpl()); } } }
protected void populateBinaryInteraction(T source, T target) { target.getPublications().addAll(source.getPublications()); target.getAuthors().addAll(source.getAuthors()); target.getInteractionTypes().addAll(source.getInteractionTypes()); target.getDetectionMethods().addAll(source.getDetectionMethods()); target.getConfidenceValues().addAll(source.getConfidenceValues()); target.getSourceDatabases().addAll(source.getSourceDatabases()); target.getInteractionAcs().addAll(source.getInteractionAcs()); target.getAnnotations().addAll(source.getAnnotations()); target.getChecksums().addAll(source.getChecksums()); target.getComplexExpansion().addAll(source.getComplexExpansion()); target.getCreationDate().addAll(source.getCreationDate()); target.getParameters().addAll(source.getParameters()); if (target.getHostOrganism() == null){ target.setHostOrganism(source.getHostOrganism()); } else if (source.getHostOrganism() != null){ target.getHostOrganism().getIdentifiers().addAll(source.getHostOrganism().getIdentifiers()); } }
public void intactToMitab(Experiment exp, BinaryInteraction binary, boolean processParticipantDetMethod, boolean processPublication){ if (exp != null && binary != null){ // process publication Publication pub = exp.getPublication(); if (pub != null && processPublication){ publicationConverter.intactToMitab(pub, binary); } // convert interaction detection method if (exp.getCvInteraction() != null){ CrossReference detMethod = cvObjectConverter.toCrossReference(exp.getCvInteraction()); if (detMethod != null){ binary.getDetectionMethods().add(detMethod); } } // process organism if (exp.getBioSource() != null){ Organism organism = organismConverter.intactToMitab(exp.getBioSource()); if (organism != null){ binary.setHostOrganism(organism); } } // process participant detection method if (processParticipantDetMethod){ processParticipantDetectionMethod(exp, binary); } } }
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()); } } }
expandedInteraction.setCreationDate(interaction.getCreationDate()); expandedInteraction.setDetectionMethods(interaction.getDetectionMethods()); expandedInteraction.setHostOrganism(interaction.getHostOrganism()); expandedInteraction.setInteractionAcs(interaction.getInteractionAcs()); expandedInteraction.setInteractionTypes(interaction.getInteractionTypes());
interaction.setXrefs(splitCrossReferences(line[PsimiTabColumns.XREFS_I.ordinal()])); interaction.setAnnotations(splitAnnotations(line[PsimiTabColumns.ANNOTATIONS_I.ordinal()])); interaction.setHostOrganism(splitOrganism(line[PsimiTabColumns.HOST_ORGANISM.ordinal()])); interaction.setParameters(splitParameters(line[PsimiTabColumns.PARAMETERS_I.ordinal()])); interaction.setCreationDate(splitDates(line[PsimiTabColumns.CREATION_DATE.ordinal()]));