Skip to content

Commit

Permalink
Fixes PfamScan operation
Browse files Browse the repository at this point in the history
  • Loading branch information
hlfernandez committed May 16, 2023
1 parent 07409dd commit 86fa917
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<packaging>pom</packaging>

<name>SEquence DAtaset builder</name>
Expand Down
2 changes: 1 addition & 1 deletion seda-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y \
stable" && \
apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io

RUN wget https://www.sing-group.org/seda/downloads/releases/seda-linux-64b-1.5.0.tar.gz -O /tmp/SEDA.tar.gz && \
RUN wget https://www.sing-group.org/seda/downloads/releases/seda-linux-64b-1.5.1.tar.gz -O /tmp/SEDA.tar.gz && \
mkdir /opt/SEDA && tar zxvf /tmp/SEDA.tar.gz -C /opt/SEDA && rm /tmp/SEDA.tar.gz

RUN sed -i -e "s#DIR=#if [ -d \"/data\" ]; then D_ARGS='-Dseda.output.directory=/data -Dseda.input.directory=/data'; else D_ARGS='-Dseda.output.directory=/ -Dseda.input.directory=/'; fi\n\nDIR=#g" /opt/SEDA/run.sh
Expand Down
2 changes: 1 addition & 1 deletion seda-docker/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y \
stable" && \
apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io

COPY seda-linux-64b-1.5.0.tar.gz /tmp/SEDA.tar.gz
COPY seda-linux-64b-1.5.1.tar.gz /tmp/SEDA.tar.gz

RUN mkdir /opt/SEDA && tar zxvf /tmp/SEDA.tar.gz -C /opt/SEDA && rm /tmp/SEDA.tar.gz

Expand Down
2 changes: 1 addition & 1 deletion seda-docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.3"
services:
seda:
image: pegi3s/seda:1.5.0
image: pegi3s/seda:1.5.1
build:
context: ./
dockerfile: Dockerfile.local
4 changes: 2 additions & 2 deletions seda-docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

# General information about the project.
project = u'SEDA'
copyright = u'2017-2021, Jorge Vieira, Cristina Vieira, Noé Vázquez, Miguel Reboiro-Jato and Hugo López-Fernández'
copyright = u'2017-2023, Jorge Vieira, Cristina Vieira, Noé Vázquez, Miguel Reboiro-Jato and Hugo López-Fernández'
author = u'Jorge Vieira, Cristina Vieira, Noé Vázquez, Miguel Reboiro-Jato and Hugo López-Fernández'

# The version info for the project you're documenting, acts as replacement for
Expand All @@ -56,7 +56,7 @@
# The short X.Y version.
version = u'1.5'
# The full version, including alpha/beta/rc tags.
release = u'1.5.0'
release = u'1.5.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-bedtools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-blast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-cga/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-clustalomega/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-emboss/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-pfam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void run() {
try {
request.query();

while (request.getStatus().equals(PfamScanStatus.RUNNING)) {
while (request.getStatus().isAlive()) {
TimeUnit.SECONDS.sleep(DELAY_STATUS_RETRY);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ private HttpEntity buildMultipartEntity() {
.addTextBody("email", this.configuration.getEmail())
.addTextBody("title", this.sequence.getName())
.addTextBody("sequence", this.sequence.getChain());

if (this.configuration.getEvalue().isPresent()) {
entityBuilder = entityBuilder
.addTextBody("evalue", Double.toString(this.configuration.getEvalue().get()));
}

return entityBuilder.build();
}
Expand All @@ -105,7 +110,7 @@ public PfamScanStatus getStatus() throws ClientProtocolException, IOException {
return PfamScanStatus.UNSUBMITED;
}

if (this.status == null || this.status == PfamScanStatus.RUNNING) {
if (this.status == null || this.status.isAlive()) {
HttpGet httpGet = new HttpGet(new StringBuilder(URL_STATUS).append(this.requestId).toString());

CloseableHttpClient httpClient = HttpClientBuilder.create().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

public class PfamScanRequestConfiguration {

public static final String DEFAULT_DATABASE = "pfam-a";

private String eMail;
private String database;
private boolean activeSitePrediction;
Expand Down Expand Up @@ -70,7 +72,7 @@ public boolean isActiveSitePrediction() {
}

public Optional<Double> getEvalue() {
return Optional.of(eValue);
return Optional.ofNullable(eValue);
}

public PfamScanSequenceErrorPolicy getErrorPolicy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@
package org.sing_group.seda.pfam;

public enum PfamScanStatus {
RUNNING, FINISHED, ERROR, FAILURE, NOT_FOUND, UNSUBMITED
RUNNING, FINISHED, ERROR, FAILURE, NOT_FOUND, UNSUBMITED, QUEUED;

public boolean isAlive() {
return this.equals(RUNNING) || this.equals(QUEUED);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
package org.sing_group.seda.pfam.gui;

import static org.sing_group.seda.pfam.PfamScanRequestConfiguration.DEFAULT_DATABASE;
import static org.sing_group.seda.pfam.gui.PfamScanTransformationConfigurationChangeType.ACTIVE_SITE_PREDICTION_CHANGED;
import static org.sing_group.seda.pfam.gui.PfamScanTransformationConfigurationChangeType.BATCH_DELAY_CHANGED;
import static org.sing_group.seda.pfam.gui.PfamScanTransformationConfigurationChangeType.EMAIL_CHANGED;
Expand All @@ -44,8 +45,6 @@
@XmlAccessorType(XmlAccessType.FIELD)
public class PfamScanTransformationProvider extends AbstractTransformationProvider {

public static final String DEFAULT_DATABASE = "pfam-a";

@XmlElement
private String eMail;

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-prosplign-procompart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-sapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda-plugin-splign-compart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion seda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sing_group</groupId>
<artifactId>seda-all</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit 86fa917

Please sign in to comment.