-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix content type issue, move genomic processor service to hpds repo
- Loading branch information
Showing
9 changed files
with
171 additions
and
1 deletion.
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,60 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>pic-sure-hpds</artifactId> | ||
<groupId>edu.harvard.hms.dbmi.avillach.hpds</groupId> | ||
<version>3.0.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>genomic-processor</artifactId> | ||
|
||
<properties> | ||
<maven.compiler.source>18</maven.compiler.source> | ||
<maven.compiler.target>18</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webflux</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>edu.harvard.hms.dbmi.avillach.hpds</groupId> | ||
<artifactId>service</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>edu.harvard.hms.dbmi.avillach.hpds</groupId> | ||
<artifactId>etl</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>edu.harvard.hms.dbmi.avillach.hpds</groupId> | ||
<artifactId>data</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
47 changes: 47 additions & 0 deletions
47
.../src/main/java/edu/harvard/hms/dbmi/avillach/hpds/genomic/GenomicProcessorController.java
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,47 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.genomic; | ||
|
||
import edu.harvard.hms.dbmi.avillach.hpds.data.genotype.InfoColumnMeta; | ||
import edu.harvard.hms.dbmi.avillach.hpds.processing.DistributableQuery; | ||
import edu.harvard.hms.dbmi.avillach.hpds.processing.GenomicProcessor; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import reactor.core.publisher.Mono; | ||
|
||
import java.math.BigInteger; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
|
||
@RestController | ||
public class GenomicProcessorController { | ||
|
||
private GenomicProcessor genomicProcessor; | ||
|
||
@Autowired | ||
public GenomicProcessorController(GenomicProcessor genomicProcessor) { | ||
this.genomicProcessor = genomicProcessor; | ||
} | ||
|
||
@PostMapping("/patients") | ||
public Mono<BigInteger> queryForPatientMask(@RequestBody DistributableQuery distributableQuery) throws InterruptedException { | ||
return genomicProcessor.getPatientMask(distributableQuery); | ||
} | ||
|
||
@PostMapping("/variants") | ||
public Mono<Collection<String>> queryForVariants(@RequestBody DistributableQuery distributableQuery) { | ||
return genomicProcessor.getVariantList(distributableQuery); | ||
} | ||
|
||
@GetMapping("/patients/ids") | ||
public List<String> getPatientIds() { | ||
return genomicProcessor.getPatientIds(); | ||
} | ||
|
||
@GetMapping("/info/meta") | ||
public List<InfoColumnMeta> getInfoMetadata() { | ||
return genomicProcessor.getInfoColumnMeta(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...main/java/edu/harvard/hms/dbmi/avillach/hpds/genomic/HpdsGenomicProcessorApplication.java
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,13 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.genomic; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class HpdsGenomicProcessorApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(HpdsGenomicProcessorApplication.class, args); | ||
} | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
...rocessor/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/genomic/ServletInitializer.java
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,13 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.genomic; | ||
|
||
import org.springframework.boot.builder.SpringApplicationBuilder; | ||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | ||
|
||
public class ServletInitializer extends SpringBootServletInitializer { | ||
|
||
@Override | ||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | ||
return application.sources(HpdsGenomicProcessorApplication.class); | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...or/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/genomic/config/ApplicationConfig.java
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,21 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.genomic.config; | ||
|
||
import edu.harvard.hms.dbmi.avillach.hpds.processing.GenomicProcessor; | ||
import edu.harvard.hms.dbmi.avillach.hpds.processing.GenomicProcessorNodeImpl; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.PropertySource; | ||
|
||
@SpringBootApplication | ||
@PropertySource("classpath:application.properties") | ||
public class ApplicationConfig { | ||
|
||
@Value( "${hpds.genomicDataDirectory}" ) | ||
private String genomicDataDirectory; | ||
|
||
@Bean | ||
public GenomicProcessor genomicProcessor() { | ||
return new GenomicProcessorNodeImpl(genomicDataDirectory); | ||
} | ||
} |
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 @@ | ||
hpds.genomicDataDirectory = /opt/local/hpds/orchestration/1040/20/all/ | ||
server.port=8090 |
13 changes: 13 additions & 0 deletions
13
...java/edu/harvard/hms/dbmi/avillach/hpds/genomic/HpdsGenomicProcessorApplicationTests.java
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,13 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.genomic; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
@SpringBootTest | ||
class HpdsGenomicProcessorApplicationTests { | ||
|
||
@Test | ||
void contextLoads() { | ||
} | ||
|
||
} |
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
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