Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into faster-lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasblum committed Dec 2, 2024
2 parents ce8deaf + 1f48e66 commit b103587
Show file tree
Hide file tree
Showing 410 changed files with 72,698 additions and 111,636 deletions.
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ FROM ubuntu:20.04

LABEL authors="Laise Florentino ([email protected]), Matthias Blum ([email protected])"

ARG VERSION=5.69-101.0
ARG VERSION
ENV TZ=Europe/London

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt-get update -y && \
apt-get install -y wget python3.8 python2.7 openjdk-11-jre-headless libpcre2-dev libgomp1 perl-doc && \
apt-get install -y wget python3.8 openjdk-11-jre-headless libpcre2-dev libgomp1 perl-doc libc6-i386 && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && ln -s /usr/bin/python3.8 /usr/bin/python

WORKDIR /opt
Expand All @@ -17,8 +17,15 @@ RUN wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${VERSION}/alt/interpro
wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/${VERSION}/alt/interproscan-core-${VERSION}.tar.gz.md5 && \
md5sum -c interproscan-core-${VERSION}.tar.gz.md5 && \
tar -zxf interproscan-core-${VERSION}.tar.gz && \
rm interproscan-core-${VERSION}.tar.gz && \
rm interproscan-core-${VERSION}.tar.gz* && \
mv /opt/interproscan-${VERSION} /opt/interproscan

WORKDIR /opt/interproscan

RUN echo "binary.phobius.pl.path=/opt/interproscan/licensed/phobius/phobius.pl" >> interproscan.properties && \
echo "binary.signalp.path=/opt/interproscan/licensed/signalp/signalp" >> interproscan.properties && \
echo "signalp.perl.library.dir=/opt/interproscan/licensed/signalp/lib" >> interproscan.properties && \
echo "binary.tmhmm.path=/opt/interproscan/licensed/tmhmm/decodeanhmm.Linux_x86_64" >> interproscan.properties && \
echo "tmhmm.model.path=/opt/interproscan/licensed/tmhmm/TMHMM2.0.model" >> interproscan.properties

ENTRYPOINT ["bash", "./interproscan.sh"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Build](https://github.com/ebi-pf-team/interproscan/actions/workflows/build-test.yml/badge.svg)](https://github.com/ebi-pf-team/interproscan/actions/workflows/build-test.yml)
[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/interpro/interproscan?label=Docker)](https://hub.docker.com/r/interpro/interproscan)
[![Docker Image Version (tag)](https://img.shields.io/docker/v/interpro/interproscan/5.72-103.0)](https://hub.docker.com/r/interpro/interproscan)

# interproscan
# InterProScan

## What is InterProScan?
[InterPro](http://www.ebi.ac.uk/interpro/) is a database which integrates together predictive information about proteins' function from a number of partner resources, giving an overview of the families that a protein belongs to and the domains and sites it contains.
Expand Down
8 changes: 4 additions & 4 deletions core/business/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>interproscan-business</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>

<packaging>jar</packaging>
<name>InterProScan Business Logic</name>
Expand All @@ -35,14 +35,14 @@
<dependency>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan-persistence</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</dependency>


<dependency>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>precalc-match-client</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions core/generic-jpa-dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>

<artifactId>generic-jpa-dao</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>

<packaging>jar</packaging>

Expand All @@ -37,7 +37,7 @@
<dependency>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan-util</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</dependency>

<!-- Hibernate -->
Expand Down
8 changes: 4 additions & 4 deletions core/io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>interproscan</artifactId>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand All @@ -14,21 +14,21 @@
<packaging>jar</packaging>

<name>InterProScan IO</name>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
<description>InterProScan IO</description>
<url>http://www.ebi.ac.uk/interpro/</url>

<dependencies>
<dependency>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan-util</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</dependency>

<dependency>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan-model</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,68 +1,39 @@
package uk.ac.ebi.interpro.scan.io.match.mobidb;


import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Required;
import uk.ac.ebi.interpro.scan.io.ParseException;

import uk.ac.ebi.interpro.scan.io.match.AbstractLineMatchParser;
import uk.ac.ebi.interpro.scan.io.match.MatchParser;
import uk.ac.ebi.interpro.scan.model.SignatureLibrary;
import uk.ac.ebi.interpro.scan.model.raw.MobiDBRawMatch;

import uk.ac.ebi.interpro.scan.model.raw.PfScanRawMatch;
import uk.ac.ebi.interpro.scan.model.raw.RawProtein;
import uk.ac.ebi.interpro.scan.util.Utilities;

import java.io.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* Parser for the MobiDB output format:
* <p>
* >UNIPARC:UPI00000000FC status=active
* 165 186
* //
* >UNIPARC:UPI0000000107 status=active
* //
* >UNIPARC:UPI0000000108 status=active
* 73 94
* 123 158
* //
* >UNIPARC:UPI0000000109 status=active
* //
* Parser for the IDRPred output format:
* PROTEIN_A 16 47 -
* PROTEIN_A 115 142 -
* PROTEIN_A 117 130 Polyampholyte
* PROTEIN_B 609 705 -
* PROTEIN_B 622 632 Proline-rich
* PROTEIN_B 655 675 Polar
* PROTEIN_B 696 705 Polyampholyte
* PROTEIN_B 792 820 -
* PROTEIN_B 808 820 Polar
* PROTEIN_B 874 893 -
* PROTEIN_B 948 1566 -
* PROTEIN_B 963 974 Polyampholyte
*
* @author Gift Nuka
* @version $Id: MobiDBMatchParser.java,v 5.20 2016/10/21 14:01:17 nuka Exp $
* @since 1.0-SNAPSHOT
* @author Gift Nuka, Matthias Blum
*/
public class MobiDBMatchParser implements MatchParser<MobiDBRawMatch> {

private static final Logger LOGGER = LogManager.getLogger(MobiDBMatchParser.class.getName());

private static final String END_OF_RECORD_MARKER = "//";

private static final char PROTEIN_ID_LINE_START = '>';

private SignatureLibrary signatureLibrary;
private String signatureLibraryRelease;

private static final Pattern QUERY_LINE_PATTERN
= Pattern.compile("^QUERY\\s+(\\S+)\\s+(\\S+)\\s+(\\d+)\\s+(.*)$");
private static final Pattern DOMAIN_LINE_PATTERN
= Pattern.compile("^(\\S+)\\s+(\\S+)\\s+(\\S+)(.*)$");
//s+(.*)$");

/**
* Matches the line with the start and stop coordinates of the disordered region.
* Group 1: Start
* Group 2: Stop.
*/
private static final Pattern START_STOP_PATTERN = Pattern.compile("^(\\d+)\\s+(\\d+).*$");

private static final Pattern DOMAIN_LINE_PATTERN = Pattern.compile("^(\\S+)\\s+(\\S+)\\s+(\\S+)(.*)$");

public MobiDBMatchParser() {
super();
Expand All @@ -73,7 +44,6 @@ public MobiDBMatchParser(SignatureLibrary signatureLibrary, String signatureLibr
this.signatureLibraryRelease = signatureLibraryRelease;
}


public SignatureLibrary getSignatureLibrary() {
return signatureLibrary;
}
Expand All @@ -91,7 +61,6 @@ public void setSignatureLibraryRelease(String signatureLibraryRelease) {
this.signatureLibraryRelease = signatureLibraryRelease;
}


public Set<RawProtein<MobiDBRawMatch>> parse(InputStream is) throws IOException, ParseException {

Map<String, RawProtein<MobiDBRawMatch>> matchData = new HashMap<>();
Expand All @@ -115,54 +84,29 @@ public Set<RawProtein<MobiDBRawMatch>> parse(InputStream is) throws IOException,

public Set<MobiDBRawMatch> parseFileInput(InputStream is) throws IOException, ParseException {
Set<MobiDBRawMatch> matches = new HashSet<>();

try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
String line;
String proteinIdentifier;
int lineNumber = 0;
String definitionLine = "";
String sequenceIdentifier = "";

while ((line = reader.readLine()) != null) {
lineNumber++;
LOGGER.debug("Line: " + line);
//id 80 99
// Utilities.verboseLog(1100, "Domain line: " + line);
Matcher matcher = DOMAIN_LINE_PATTERN.matcher(line.trim());

if (matcher.matches()) {
// Utilities.verboseLog(1100, "number of groups: " + matcher.groupCount());
sequenceIdentifier = matcher.group(1);
String sequenceIdentifier = matcher.group(1);
int locationStart = Integer.parseInt(matcher.group(2));
int locationEnd = Integer.parseInt(matcher.group(3));
String feature = matcher.group(4).trim();
if (! (feature.isEmpty() || feature == null)) {
String feature2 = feature;
// Utilities.verboseLog(1100, "We have a feature : " + feature2 + " " +
// sequenceIdentifier + " region: " + locationStart + "-" + locationEnd);
}else{
if (feature.equals("-")) {
feature = "";
}

//TODO hardcoded accession should be removed
matches.add(new MobiDBRawMatch(sequenceIdentifier, "mobidb-lite",
SignatureLibrary.MOBIDB_LITE, signatureLibraryRelease,
locationStart, locationEnd, feature));
// Utilities.verboseLog(110, "Match : " + getLastElement(matches));
}
}
}
Utilities.verboseLog(1100, "MobiDB matches size : " + matches.size());
return matches;
}

//get the last item in the set
public Object getLastElement(final Collection c) {
final Iterator itr = c.iterator();
Object lastElement = itr.next();
while (itr.hasNext()) {
lastElement = itr.next();
}
return lastElement;
return matches;
}


}
6 changes: 3 additions & 3 deletions core/jms-implementation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>jms-implementation</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>

<packaging>jar</packaging>

Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>uk.ac.ebi.interpro.scan</groupId>
<artifactId>interproscan-management</artifactId>
<version>5.69-101.0</version>
<version>5.72-103.0</version>
</dependency>

<dependency>
Expand Down
Loading

0 comments on commit b103587

Please sign in to comment.