-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
4,128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# When shell scripts end in CRLF, bash gives a cryptic error message | ||
*.sh text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# Standard Maven .gitignore | ||
# | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
|
||
# | ||
# IntelliJ | ||
# | ||
*.iml | ||
.idea/* | ||
!.idea/runConfigurations/ | ||
|
||
# | ||
# Visual Studio Code | ||
# | ||
.settings/ | ||
.classpath | ||
.factorypath | ||
.project | ||
.vscode/ | ||
.editorconfig | ||
|
||
**/.DS_Store | ||
settings.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM maven:3.8.1-openjdk-11-slim as build | ||
|
||
COPY $PWD /mtbimporter | ||
WORKDIR /mtbimporter | ||
|
||
RUN mvn install | ||
|
||
FROM r-base:4.1.0 | ||
|
||
RUN apt-get update && apt-get install -y default-jre | ||
|
||
RUN wget https://download.docker.com/linux/debian/dists/bullseye/pool/stable/amd64/docker-ce-cli_20.10.7~3-0~debian-bullseye_amd64.deb && dpkg -i docker-ce-cli_20.10.7~3-0~debian-bullseye_amd64.deb && rm docker-ce-cli_20.10.7~3-0~debian-bullseye_amd64.deb | ||
|
||
COPY --from=build /mtbimporter/target/mtbimporter-*-jar-with-dependencies.jar /app/mtbimporter.jar | ||
CMD ["java", "-jar", "/app/mtbimporter.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "3" | ||
services: | ||
mtbimporter: | ||
restart: unless-stopped | ||
build: ./ | ||
image: ghcr.io/buschlab/mtbimporter:latest | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock" | ||
- "./settings.yaml:/app/settings.yaml" | ||
|
||
networks: | ||
- mtbimporter_net | ||
|
||
networks: | ||
mtbimporter_net: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>de.uzl.lied</groupId> | ||
<artifactId>mtbimporter</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<properties> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<exec.mainClass>de.uzl.lied.mtbimporter.mtbimporter</exec.mainClass> | ||
<maven-source-plugin.version>3.2.1</maven-source-plugin.version> | ||
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version> | ||
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version> | ||
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-base</artifactId> | ||
<version>5.4.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-client</artifactId> | ||
<version>5.4.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>ca.uhn.hapi.fhir</groupId> | ||
<artifactId>hapi-fhir-structures-r4</artifactId> | ||
<version>5.4.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
<version>2.11.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
<version>2.11.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-csv</artifactId> | ||
<version>2.11.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-properties</artifactId> | ||
<version>2.11.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-yaml</artifactId> | ||
<version>2.11.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-text</artifactId> | ||
<version>1.9</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>2.8.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>30.0-jre</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
<version>5.3.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.samply</groupId> | ||
<artifactId>mdrclient</artifactId> | ||
<version>3.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.albfernandez</groupId> | ||
<artifactId>juniversalchardet</artifactId> | ||
<version>2.4.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
<version>3.0.8</version> | ||
<type>pom</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-dateutil</artifactId> | ||
<version>2.5.0</version> | ||
<classifier>indy</classifier> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<version>${maven-enforcer-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<rules> | ||
<requireMavenVersion> | ||
<version>3.6.3</version> | ||
</requireMavenVersion> | ||
</rules> | ||
<fail>true</fail> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${maven-surefire-plugin.version}</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>${maven-javadoc-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>${maven-source-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
<archive> | ||
<manifest> | ||
<mainClass>de.uzl.lied.mtbimporter.MtbImporter</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package de.uzl.lied.mtbimporter; | ||
|
||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Timer; | ||
|
||
import de.uzl.lied.mtbimporter.jobs.CheckDropzone; | ||
import de.uzl.lied.mtbimporter.jobs.FhirResolver; | ||
import de.uzl.lied.mtbimporter.jobs.mdr.centraxx.CxxMdrLogin; | ||
import de.uzl.lied.mtbimporter.model.CbioPortalStudy; | ||
import de.uzl.lied.mtbimporter.settings.ConfigurationLoader; | ||
import de.uzl.lied.mtbimporter.settings.Mdr; | ||
import de.uzl.lied.mtbimporter.settings.Settings; | ||
import de.uzl.lied.mtbimporter.tasks.AddClinicalData; | ||
import de.uzl.lied.mtbimporter.tasks.AddGeneticData; | ||
import de.uzl.lied.mtbimporter.tasks.AddResourceData; | ||
import de.uzl.lied.mtbimporter.tasks.AddSignatureData; | ||
import de.uzl.lied.mtbimporter.tasks.AddTimelineData; | ||
|
||
public final class MtbImporter { | ||
/** | ||
* | ||
* @param args The arguments of the program. | ||
* @throws InterruptedException | ||
* @throws IOException | ||
*/ | ||
public static void main(String[] args) throws InterruptedException, IOException { | ||
InputStream settingsYaml = ClassLoader.getSystemClassLoader().getResourceAsStream("settings.yaml"); | ||
if (args.length == 1) { | ||
settingsYaml = new FileInputStream(args[0]); | ||
} | ||
|
||
ConfigurationLoader configLoader = new ConfigurationLoader(); | ||
configLoader.loadConfiguration(settingsYaml, Settings.class); | ||
|
||
FhirResolver.initalize(); | ||
for (Mdr m : Settings.getMdr()) { | ||
if(m.getCxx() != null) { | ||
CxxMdrLogin.login(m.getCxx()); | ||
} | ||
} | ||
|
||
CbioPortalStudy study = new CbioPortalStudy(); | ||
AddGeneticData.processMafFile(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_mutation_extended.maf")); | ||
AddGeneticData.processSegFile(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_cna.seg")); | ||
AddGeneticData.processGenePanelFile(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_gene_panel_matrix.txt")); | ||
AddClinicalData.processClinicalPatient(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_clinical_patient.txt")); | ||
AddClinicalData.processClinicalSample(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_clinical_sample.txt")); | ||
study.setSampleResources(AddResourceData.readResourceFile(new File(Settings.getStudyFolder() + Settings.getState() + "/data_resource_sample.txt"))); | ||
AddSignatureData.processContribution(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_mutational_signature_contribution.txt")); | ||
AddSignatureData.processLimit(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_mutational_signature_limit.txt")); | ||
AddGeneticData.processCnaFile(study, new File(Settings.getStudyFolder() + Settings.getState() + "/data_cna.txt")); | ||
File[] timelines = new File(Settings.getStudyFolder() + Settings.getState()).listFiles((File f) -> f.getName().startsWith("data_timeline")); | ||
for(File t : timelines) { | ||
AddTimelineData.processTimelineFile(study, t); | ||
} | ||
|
||
Timer t = new Timer(); | ||
CheckDropzone checkDropzone = new CheckDropzone(study); | ||
t.scheduleAtFixedRate(checkDropzone, 0, Settings.getCronIntervall()); | ||
|
||
System.out.println("MtbImporter started!"); | ||
} | ||
} |
Oops, something went wrong.