Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<dependency>
<groupId>org.reactome.server.graph</groupId>
<artifactId>graph-core</artifactId>
<version>2.0.9-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -61,6 +62,7 @@
<dependency>
<groupId>org.reactome.server.interactors</groupId>
<artifactId>interactor-core</artifactId>
<version>1.1.6-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.xerial</groupId>
Expand All @@ -73,6 +75,12 @@
</exclusions>
</dependency>

<dependency>
<groupId>uk.ac.ebi.enfin.mi.cluster</groupId>
<artifactId>micluster</artifactId>
<version>1.9.0-SNAPSHOT</version>
</dependency>


<dependency>
<groupId>org.reactome.server.tools</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,14 @@ private List<Interaction> convertCustomInteraction(String searchTerm, Set<Custom
Interactor interactorA = new Interactor();
interactorA.setAcc(customInteraction.getInteractorIdA());
interactorA.setAlias(customInteraction.getInteractorAliasA());
interactorA.setType(customInteraction.getInteractorTypeA());


// create interactor B
Interactor interactorB = new Interactor();
interactorB.setAcc(customInteraction.getInteractorIdB());
interactorB.setAlias(customInteraction.getInteractorAliasB());
interactorB.setType(customInteraction.getInteractorTypeB());

// keep the search term, always in side A
if (searchTerm.equals(interactorA.getAcc())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ private Interactors getInteractionResult(Map<String, List<Interaction>> interact
interactor.setAcc(interaction.getInteractorB().getAcc());
interactor.setScore(interaction.getIntactScore());
interactor.setAlias(interaction.getInteractorB().getAliasWithoutSpecies(true));
interactor.setType(interaction.getInteractorB().getType());

// Set Id as auto increment
interactor.setId(count++);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class Interactor {
@Schema(description = "This represents the URL for the given interactions identifiers.")
private String evidencesURL;

@Schema(description = "This represents the type for given interaction")
private String type;

public Interactor() {
}

Expand All @@ -58,6 +61,11 @@ public Interactor(Interaction interaction) {

this.score = interaction.getScore();

this.type = re.getMoleculeType();

if (re.getName() != null && !re.getName().isEmpty()) this.alias = re.getName().get(0);


if (re instanceof ReferenceSequence) {
ReferenceSequence rs = (ReferenceSequence) re;
if (rs.getGeneName() != null && !rs.getGeneName().isEmpty()) this.alias = rs.getGeneName().get(0);
Expand Down Expand Up @@ -119,4 +127,12 @@ public String getEvidencesURL() {
public void setEvidencesURL(String evidencesURL) {
this.evidencesURL = evidencesURL;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class TokenControllerTest extends BaseTest {

@Test
public void getInteractors() throws Exception {
String token = getTokenFromLastestPSIFile(tokenFolder);
String token = getTokenFromLatestPSIFile(tokenFolder);

/*
To test it, you will need a valid token, which can be generated when running the CustomPsicquicControllerTest.
Expand All @@ -31,7 +31,7 @@ The token (PSI--XXXXX.bin) will be written in the file system based on the <tupl
}

/* Get the newest file for a specific extension */
private String getTokenFromLastestPSIFile(String filePath) {
private String getTokenFromLatestPSIFile(String filePath) {
String token;
File dir = new File(filePath);
FileFilter fileFilter = new WildcardFileFilter("PSI*");
Expand Down