diff --git a/complex-go-export/pom.xml b/complex-go-export/pom.xml
index 3b8d6eec4..ee2287dce 100644
--- a/complex-go-export/pom.xml
+++ b/complex-go-export/pom.xml
@@ -5,7 +5,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
complex-go-export
diff --git a/complex-pdb-export/pom.xml b/complex-pdb-export/pom.xml
index 0ee01f1c7..d016a72e8 100644
--- a/complex-pdb-export/pom.xml
+++ b/complex-pdb-export/pom.xml
@@ -5,7 +5,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
complex-pdb-export
diff --git a/complex-tab-export/pom.xml b/complex-tab-export/pom.xml
index d8045b4fa..177f8e586 100644
--- a/complex-tab-export/pom.xml
+++ b/complex-tab-export/pom.xml
@@ -5,7 +5,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
diff --git a/complex-uniprot-dr-export/pom.xml b/complex-uniprot-dr-export/pom.xml
index 0a3f660ab..2f856cc92 100644
--- a/complex-uniprot-dr-export/pom.xml
+++ b/complex-uniprot-dr-export/pom.xml
@@ -5,7 +5,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
complex-uniprot-dr-export
diff --git a/cttv-exporter/pom.xml b/cttv-exporter/pom.xml
index 269d6861d..79324b587 100644
--- a/cttv-exporter/pom.xml
+++ b/cttv-exporter/pom.xml
@@ -3,7 +3,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/imex-id-update/pom.xml b/imex-id-update/pom.xml
index bf2ab507d..db7459438 100755
--- a/imex-id-update/pom.xml
+++ b/imex-id-update/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
uk.ac.ebi.intact.dataexchange.imex
diff --git a/intact-cvutils/pom.xml b/intact-cvutils/pom.xml
index e721bd51e..87f67fce4 100644
--- a/intact-cvutils/pom.xml
+++ b/intact-cvutils/pom.xml
@@ -3,7 +3,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/intact-db-importer/pom.xml b/intact-db-importer/pom.xml
index a13cb4d64..c8f39ae26 100644
--- a/intact-db-importer/pom.xml
+++ b/intact-db-importer/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-db-importer
diff --git a/intact-enricher/pom.xml b/intact-enricher/pom.xml
index bce209919..0cb4bfcf3 100644
--- a/intact-enricher/pom.xml
+++ b/intact-enricher/pom.xml
@@ -4,7 +4,7 @@
intact-dataexchange-master
uk.ac.ebi.intact.dataexchange
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/intact-mi-cluster-score/pom.xml b/intact-mi-cluster-score/pom.xml
index 97154cd91..d88af8727 100644
--- a/intact-mi-cluster-score/pom.xml
+++ b/intact-mi-cluster-score/pom.xml
@@ -4,7 +4,7 @@
intact-dataexchange-master
uk.ac.ebi.intact.dataexchange
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-mi-cluster-score
diff --git a/intact-mutation-export/pom.xml b/intact-mutation-export/pom.xml
index 3fbc37c52..4668f9e57 100644
--- a/intact-mutation-export/pom.xml
+++ b/intact-mutation-export/pom.xml
@@ -3,7 +3,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/intact-orthology-import/pom.xml b/intact-orthology-import/pom.xml
index 093a36abb..ff10e1961 100644
--- a/intact-orthology-import/pom.xml
+++ b/intact-orthology-import/pom.xml
@@ -8,7 +8,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-orthology-import
diff --git a/intact-pdbe-import/pom.xml b/intact-pdbe-import/pom.xml
index feab18848..fbf09bcf4 100644
--- a/intact-pdbe-import/pom.xml
+++ b/intact-pdbe-import/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/intact-tasks/pom.xml b/intact-tasks/pom.xml
index 92ccd0d3a..0634e4a85 100644
--- a/intact-tasks/pom.xml
+++ b/intact-tasks/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/intact-uniprot-export/pom.xml b/intact-uniprot-export/pom.xml
index 354c75f13..4b8731580 100644
--- a/intact-uniprot-export/pom.xml
+++ b/intact-uniprot-export/pom.xml
@@ -3,7 +3,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/pom.xml b/pom.xml
index e37d7a48a..9f6dfbb39 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
pom
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
IntAct Data Exchange
Data Exchange Master POM
diff --git a/psimi/intact-psimi-exporter/pom.xml b/psimi/intact-psimi-exporter/pom.xml
index f1f9df9fa..e3ded35b2 100644
--- a/psimi/intact-psimi-exporter/pom.xml
+++ b/psimi/intact-psimi-exporter/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange.psimi
intact-psimi-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-psimi-exporter
diff --git a/psimi/pom.xml b/psimi/pom.xml
index 770b76615..5663f78cc 100644
--- a/psimi/pom.xml
+++ b/psimi/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psimitab/intact-calimocho-converters/pom.xml b/psimi/psimitab/intact-calimocho-converters/pom.xml
index d74f8a9a1..9a10354f5 100644
--- a/psimi/psimitab/intact-calimocho-converters/pom.xml
+++ b/psimi/psimitab/intact-calimocho-converters/pom.xml
@@ -4,7 +4,7 @@
psimitab-master
uk.ac.ebi.intact.dataexchange.psimi
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-calimocho-converters
diff --git a/psimi/psimitab/intact-jami-mitab/pom.xml b/psimi/psimitab/intact-jami-mitab/pom.xml
index 0f01a89f2..d600dcf50 100644
--- a/psimi/psimitab/intact-jami-mitab/pom.xml
+++ b/psimi/psimitab/intact-jami-mitab/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange.psimi
psimitab-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-jami-mitab
diff --git a/psimi/psimitab/intact-psimitab-converters/pom.xml b/psimi/psimitab/intact-psimitab-converters/pom.xml
index 870687f08..639da1468 100755
--- a/psimi/psimitab/intact-psimitab-converters/pom.xml
+++ b/psimi/psimitab/intact-psimitab-converters/pom.xml
@@ -3,7 +3,7 @@
psimitab-master
uk.ac.ebi.intact.dataexchange.psimi
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psimitab/intact-solr-home/pom.xml b/psimi/psimitab/intact-solr-home/pom.xml
index 2636ef9e7..70d92f92b 100644
--- a/psimi/psimitab/intact-solr-home/pom.xml
+++ b/psimi/psimitab/intact-solr-home/pom.xml
@@ -3,7 +3,7 @@
psimitab-master
uk.ac.ebi.intact.dataexchange.psimi
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psimitab/intact-solr/pom.xml b/psimi/psimitab/intact-solr/pom.xml
index d5cf73368..e5ab81cde 100644
--- a/psimi/psimitab/intact-solr/pom.xml
+++ b/psimi/psimitab/intact-solr/pom.xml
@@ -6,7 +6,7 @@
psimitab-master
uk.ac.ebi.intact.dataexchange.psimi
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractor.java b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractor.java
index d2241f99b..18f9658dd 100644
--- a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractor.java
+++ b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractor.java
@@ -1,5 +1,7 @@
package uk.ac.ebi.intact.dataexchange.psimi.solr.complex;
+import java.util.List;
+
public class ComplexInteractor {
/*************************/
@@ -15,7 +17,8 @@ public ComplexInteractor(String identifier,
String description,
String stochiometry,
String interactorType,
- String organismName) {
+ String organismName,
+ List xrefs) {
this.identifier = identifier;
this.identifierLink = identifierLink;
this.name = name;
@@ -23,6 +26,7 @@ public ComplexInteractor(String identifier,
this.stochiometry = stochiometry;
this.interactorType = interactorType;
this.organismName = organismName;
+ this.xrefs = xrefs;
}
/*********************************/
@@ -85,6 +89,14 @@ public void setOrganismName(String organismName) {
this.organismName = organismName;
}
+ public List getXrefs() {
+ return xrefs;
+ }
+
+ public void setXrefs(List xrefs) {
+ this.xrefs = xrefs;
+ }
+
/********************************/
/* Private attributes */
/********************************/
@@ -96,4 +108,5 @@ public void setOrganismName(String organismName) {
private String stochiometry = null;
private String interactorType;
private String organismName;
+ private List xrefs;
}
diff --git a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractorXref.java b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractorXref.java
new file mode 100644
index 000000000..7df01def6
--- /dev/null
+++ b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/complex/ComplexInteractorXref.java
@@ -0,0 +1,66 @@
+package uk.ac.ebi.intact.dataexchange.psimi.solr.complex;
+
+public class ComplexInteractorXref {
+
+ /*************************/
+ /* Constructors */
+ /*************************/
+
+ public ComplexInteractorXref() {
+ }
+
+ public ComplexInteractorXref(String identifier,
+ String identifierLink,
+ String database,
+ String qualifier) {
+ this.identifier = identifier;
+ this.identifierLink = identifierLink;
+ this.database = database;
+ this.qualifier = qualifier;
+ }
+
+ /*********************************/
+ /* Getters and Setters */
+ /*********************************/
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public String getIdentifierLink() {
+ return identifierLink;
+ }
+
+ public void setIdentifierLink(String identifierLink) {
+ this.identifierLink = identifierLink;
+ }
+
+ public String getDatabase() {
+ return database;
+ }
+
+ public void setDatabase(String database) {
+ this.database = database;
+ }
+
+ public String getQualifier() {
+ return qualifier;
+ }
+
+ public void setQualifier(String qualifier) {
+ this.qualifier = qualifier;
+ }
+
+ /********************************/
+ /* Private attributes */
+ /********************************/
+
+ private String identifier = null;
+ private String identifierLink = null;
+ private String database = null;
+ private String qualifier = null;
+}
diff --git a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/enricher/ComplexSolrEnricher.java b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/enricher/ComplexSolrEnricher.java
index 1a8418617..0cad4ecc0 100644
--- a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/enricher/ComplexSolrEnricher.java
+++ b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/enricher/ComplexSolrEnricher.java
@@ -12,6 +12,7 @@
import uk.ac.ebi.intact.bridges.ontologies.term.OntologyTerm;
import uk.ac.ebi.intact.dataexchange.psimi.solr.complex.ComplexFieldNames;
import uk.ac.ebi.intact.dataexchange.psimi.solr.complex.ComplexInteractor;
+import uk.ac.ebi.intact.dataexchange.psimi.solr.complex.ComplexInteractorXref;
import uk.ac.ebi.intact.dataexchange.psimi.solr.ontology.OntologySearcher;
import uk.ac.ebi.intact.dataexchange.psimi.solr.util.ComplexUtils;
import uk.ac.ebi.intact.model.*;
@@ -20,6 +21,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
+import java.util.stream.Collectors;
/**
* Complex Field Enricher is such as Ontoly Field Enricher
@@ -38,8 +40,12 @@ public class ComplexSolrEnricher extends AbstractOntologyEnricher{
private PsimiTabReader reader;
private final ObjectMapper mapper;
- private final static String EXP_EVIDENCE="exp-evidence";
- private final static String INTACT_SECONDARY="intact-secondary";
+ private static final String EXP_EVIDENCE="exp-evidence";
+ private static final String INTACT_SECONDARY="intact-secondary";
+
+ // Currently, we are only storing interactors xrefs from the following databases:
+ // - panther (MI:0702)
+ private static final Set INTERACTOR_XREF_DATABASE_MIS_TO_STORE = Set.of("MI:0702");
/*************************/
/* Constructor */
@@ -202,6 +208,16 @@ public void enrichSerialisedParticipant(Component participant, SolrInputDocument
Interactor interactor = participant.getInteractor();
String identifier = ComplexUtils.getParticipantIdentifier(participant);
+ List xrefs = interactor.getXrefs().stream()
+ .filter(xref -> xref.getCvDatabase() != null)
+ .filter(xref -> INTERACTOR_XREF_DATABASE_MIS_TO_STORE.contains(xref.getCvDatabase().getIdentifier()))
+ .map(xref -> new ComplexInteractorXref(
+ xref.getPrimaryId(),
+ ComplexUtils.getIdentifierLink(xref, xref.getPrimaryId()),
+ xref.getCvDatabase() != null ? xref.getCvDatabase().getShortLabel() : null,
+ xref.getCvXrefQualifier() != null ? xref.getCvXrefQualifier().getShortLabel() : null))
+ .collect(Collectors.toList());
+
ComplexInteractor complexInteractor = new ComplexInteractor(
identifier,
ComplexUtils.getParticipantIdentifierLink(participant, identifier),
@@ -209,7 +225,8 @@ public void enrichSerialisedParticipant(Component participant, SolrInputDocument
interactor.getFullName(),
ComplexUtils.getParticipantStoichiometry(participant),
interactor.getCvInteractorType().getFullName(),
- findInteractorOrganismName(interactor));
+ findInteractorOrganismName(interactor),
+ xrefs);
String serialisedInteractor = mapper.writeValueAsString(complexInteractor);
solrDocument.addField(ComplexFieldNames.SERIALISED_INTERACTION, serialisedInteractor);
}
diff --git a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/util/ComplexUtils.java b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/util/ComplexUtils.java
index aad8cd0ef..0f4bed800 100644
--- a/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/util/ComplexUtils.java
+++ b/psimi/psimitab/intact-solr/src/main/java/uk/ac/ebi/intact/dataexchange/psimi/solr/util/ComplexUtils.java
@@ -59,6 +59,10 @@ public static String getParticipantIdentifier(Component participant) {
public static String getParticipantIdentifierLink(Component participant, String identifier) {
InteractorXref xref = getParticipantIdentifierXref(participant);
+ return getIdentifierLink(xref, identifier);
+ }
+
+ public static String getIdentifierLink(InteractorXref xref, String identifier) {
if (xref != null && xref.getParent() != null) {
Annotation annot = AnnotatedObjectUtils.findAnnotationByTopicMiOrLabel(xref.getCvDatabase(), SEARCH_MI);
if (annot == null) {
diff --git a/psimi/psimitab/pom.xml b/psimi/psimitab/pom.xml
index d0f4895f1..1c6be957e 100644
--- a/psimi/psimitab/pom.xml
+++ b/psimi/psimitab/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange.psimi
intact-psimi-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psixml/intact-jami-xml/pom.xml b/psimi/psixml/intact-jami-xml/pom.xml
index cce169634..9c33a49b7 100644
--- a/psimi/psixml/intact-jami-xml/pom.xml
+++ b/psimi/psixml/intact-jami-xml/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange.psimi
intact-psixml
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-jami-xml
diff --git a/psimi/psixml/intact-psixml-converters/pom.xml b/psimi/psixml/intact-psixml-converters/pom.xml
index 599258646..492417902 100644
--- a/psimi/psixml/intact-psixml-converters/pom.xml
+++ b/psimi/psixml/intact-psixml-converters/pom.xml
@@ -4,7 +4,7 @@
intact-psixml
uk.ac.ebi.intact.dataexchange.psimi
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psixml/intact-psixml-dbimporter/pom.xml b/psimi/psixml/intact-psixml-dbimporter/pom.xml
index 8e38ae60c..977d5a259 100644
--- a/psimi/psixml/intact-psixml-dbimporter/pom.xml
+++ b/psimi/psixml/intact-psixml-dbimporter/pom.xml
@@ -6,7 +6,7 @@
intact-psixml
uk.ac.ebi.intact.dataexchange.psimi
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
intact-psixml-dbimporter
diff --git a/psimi/psixml/intact-psixml-exchange/pom.xml b/psimi/psixml/intact-psixml-exchange/pom.xml
index 830e2d10e..d5e00573c 100644
--- a/psimi/psixml/intact-psixml-exchange/pom.xml
+++ b/psimi/psixml/intact-psixml-exchange/pom.xml
@@ -3,7 +3,7 @@
uk.ac.ebi.intact.dataexchange.psimi
intact-psixml
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/psimi/psixml/pom.xml b/psimi/psixml/pom.xml
index 7c1472b27..7ae8dff8f 100644
--- a/psimi/psixml/pom.xml
+++ b/psimi/psixml/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange.psimi
intact-psimi-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
4.0.0
diff --git a/structured-abstract/pom.xml b/structured-abstract/pom.xml
index 0bd6ee7b2..2005f81e8 100644
--- a/structured-abstract/pom.xml
+++ b/structured-abstract/pom.xml
@@ -4,7 +4,7 @@
uk.ac.ebi.intact.dataexchange
intact-dataexchange-master
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
structured-abstract