Skip to content

Commit

Permalink
Updated dependencies and CI info; removed use of Trove.
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorRodchenkov committed Jan 22, 2024
1 parent 1b6eae1 commit c371cb5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build with Maven

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
uses: PathwayCommons/cpath2/.github/workflows/maven.yml@master
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# drugbank-to-biopax

[![Build with Maven](https://github.com/PathwayCommons/drugbank-to-biopax/actions/workflows/build.yml/badge.svg)](https://github.com/PathwayCommons/drugbank-to-biopax/actions/workflows/build.yml)

Originated from https://bitbucket.org/armish/gsoc14 and will continue here (ToDo).

## DrugBank to BioPAX Level3 data converter.
Expand All @@ -20,7 +23,7 @@ hence we parse only this information and convert it to BioPAX `BiochemicalReacti
These binary relationships do not contain structured mechanism information,
e.g. how a drug inhibits or potentiates a target.
We have decided to encode this information in BioPAX by using `SequenceModificationFeature`s with `active` and `inactive` terms and associating these features with target proteins.
Therefore the final BioPAX model contains `BiochemicalReaction`s where drugs regulate the reaction and the participant protein either gets activated.
Therefore, the final BioPAX model contains `BiochemicalReaction`s where drugs regulate the reaction and the participant protein either gets activated.
The type of regulation is based on the controlled vocabulary adopted by DrugBank.
If the interaction type is one of the following,
then we represent that as a negative regulation, meaning that drug inhibits the inactivation of the protein (double negative): substrate, agonist, inducer, potentiator, stimulator, cofactor or ligand.
Expand All @@ -32,7 +35,7 @@ The following screenshot, for example, shows positive (green edges) and negative

For some drugs, the XML file also contains information about how the drug is metabolized by various enzymes,
but we currently do not capture this in the final model.
The reason we are not doing this is partly due to incomplete knowledge (especially regarding to the intermediate chemicals) and partly due to the fact that [SMPDB](http://www.smpdb.ca/) knowledgebase already has these in BioPAX.
The reason we are not doing this is partly due to incomplete knowledge (especially regarding the intermediate chemicals) and partly due to the fact that [SMPDB](http://www.smpdb.ca/) knowledgebase already has these in BioPAX.

### Usage
Check out (git clone) and change to:
Expand Down Expand Up @@ -60,7 +63,7 @@ Once downloaded, you can then convert the model as follows:
The (OLD) validation report is available under the Downloads: [goal3_drugbank_validationResults_20140730.zip](https://bitbucket.org/armish/gsoc14/downloads/goal3_drugbank_validationResults_20140730.zip).
The converted model does not have errors, but it produces warnings for few known cases.

The first noticable problem has to do with the `active` and `inactive` terms of the modicification features.
The first noticeable problem has to do with the `active` and `inactive` terms of the modification features.
These terms are not registered in Miriam, but they have been used in BioPAX models, especially in NCI-PID.
Ideally instead of these terms, we encode the activation reaction with all mechanistic details;
but since this information is not available, we have to ignore these warnings for the time being.
Expand Down
35 changes: 15 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>pathwaycommons</groupId>
<artifactId>drugbank-to-biopax</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>drugbank-to-biopax</name>

Expand Down Expand Up @@ -47,15 +47,15 @@
</issueManagement>

<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/PathwayCommons/${project.name}</url>
<system>GitHub</system>
<url>https://github.com/PathwayCommons/${project.name}/actions/workflows/build.yml</url>
</ciManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<paxtools.version>5.1.0</paxtools.version>
<slf4j.version>1.7.7</slf4j.version>
<paxtools.version>5.3.0</paxtools.version>
<slf4j.version>1.7.36</slf4j.version>
<github.global.server>github</github.global.server>
</properties>

Expand All @@ -66,8 +66,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
Expand All @@ -94,12 +94,12 @@
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.8</version>
<version>2.10</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-scm</artifactId>
<version>2.8</version>
<version>2.10</version>
</extension>
</extensions>
<plugins>
Expand All @@ -118,7 +118,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4</version>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -149,7 +149,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -158,7 +158,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -171,7 +171,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -227,11 +227,6 @@
<artifactId>paxtools-core</artifactId>
<version>${paxtools.version}</version>
</dependency>
<dependency>
<groupId>org.biopax.paxtools</groupId>
<artifactId>paxtools-trove</artifactId>
<version>${paxtools.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down Expand Up @@ -260,9 +255,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
<version>2.3.1</version>
</dependency>
</dependencies>

Expand Down
10 changes: 1 addition & 9 deletions src/main/java/ca/drugbank/converter/DrugbankToBiopax.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
import org.apache.commons.cli.*;
import org.biopax.paxtools.io.SimpleIOHandler;
import org.biopax.paxtools.model.Model;
import org.biopax.paxtools.trove.TProvider;
import org.biopax.paxtools.util.BPCollections;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.JAXBException;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class DrugbankToBiopax {
private static Logger log = LoggerFactory.getLogger(DrugbankToBiopax.class);
Expand All @@ -35,9 +33,6 @@ public static void main( String[] args ) throws JAXBException {
System.exit(-1);
}

// Memory efficiency fix for huge BioPAX models
BPCollections.I.setProvider(new TProvider());

String drugBankFile = commandLine.getOptionValue("d");
log.debug("Using DrugBank file: " + drugBankFile);
FileInputStream drugBankStream = new FileInputStream(drugBankFile);
Expand All @@ -50,7 +45,6 @@ public static void main( String[] args ) throws JAXBException {
SimpleIOHandler simpleIOHandler = new SimpleIOHandler();
FileOutputStream outputStream = new FileOutputStream(outputFile);
simpleIOHandler.convertToOWL(model, outputStream);
// outputStream.close(); //not needed
log.debug("All done.");
} catch (ParseException e) {
System.err.println(e.getMessage());
Expand All @@ -59,8 +53,6 @@ public static void main( String[] args ) throws JAXBException {
System.exit(-1);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}

0 comments on commit c371cb5

Please sign in to comment.