From 8f00af05f2920471fa830898567eca58ad576159 Mon Sep 17 00:00:00 2001 From: Ryan Amari Date: Wed, 17 Jan 2024 11:32:58 -0700 Subject: [PATCH] Add test case for brca high severity data issue --- .../src/main/resources/application.properties | 2 +- .../hpds/processing/GenomicProcessorConfig.java | 3 +-- .../genomic/GenomicProcessorRestClientTest.java | 14 +++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/genomic-processor/src/main/resources/application.properties b/genomic-processor/src/main/resources/application.properties index 3bda4e51..f5c890b4 100644 --- a/genomic-processor/src/main/resources/application.properties +++ b/genomic-processor/src/main/resources/application.properties @@ -1,2 +1,2 @@ -hpds.genomicDataDirectory = /opt/local/hpds/orchestration/1040/20/all/ +hpds.genomicDataDirectory = /opt/local/hpds/phs0000946/17/ server.port=8090 \ No newline at end of file diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessorConfig.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessorConfig.java index 9ea7b5cb..86ec80e8 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessorConfig.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessorConfig.java @@ -13,7 +13,6 @@ import java.util.stream.IntStream; @SpringBootApplication -@PropertySource("classpath:application.properties") public class GenomicProcessorConfig { @Value("${HPDS_GENOMIC_DATA_DIRECTORY:/opt/local/hpds/all/}") @@ -29,7 +28,7 @@ public GenomicProcessor localGenomicProcessor() { @Bean(name = "localDistributedGenomicProcessor") @ConditionalOnProperty(prefix = "hpds.genomicProcessor", name = "impl", havingValue = "localDistributed") public GenomicProcessor localDistributedGenomicProcessor() { - List processorNodes = IntStream.range(1, 22) + List processorNodes = IntStream.range(1, 23) .mapToObj(i -> new GenomicProcessorNodeImpl(hpdsGenomicDataDirectory + "/" + i + "/")) .collect(Collectors.toList()); return new GenomicProcessorParentImpl(processorNodes); diff --git a/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/genomic/GenomicProcessorRestClientTest.java b/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/genomic/GenomicProcessorRestClientTest.java index 08d2e83d..527b24ad 100644 --- a/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/genomic/GenomicProcessorRestClientTest.java +++ b/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/genomic/GenomicProcessorRestClientTest.java @@ -11,6 +11,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.IntStream; public class GenomicProcessorRestClientTest { @@ -24,15 +26,13 @@ public void simpleTest() { List variantInfoFilters = new ArrayList<>(); Query.VariantInfoFilter variantInfoFilter = new Query.VariantInfoFilter(); variantInfoFilter.categoryVariantInfoFilters = Map.of( - "Gene_with_variant", new String[]{"FRG1FP"} + "Gene_with_variant", new String[]{"BRCA1"}, + "Variant_consequence_calculated", new String[]{"splice_donor_variant"} ); - Query.VariantInfoFilter variantInfoFilter2 = new Query.VariantInfoFilter(); - variantInfoFilter2.categoryVariantInfoFilters = Map.of( - "Gene_with_variant", new String[]{"ACTG1P3"} - ); - variantInfoFilters.add(variantInfoFilter2); + variantInfoFilters.add(variantInfoFilter); distributableQuery.setVariantInfoFilters(variantInfoFilters); - distributableQuery.setPatientIds(Set.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)); + Set patientIds = IntStream.range(53000, 53635).boxed().collect(Collectors.toSet()); + distributableQuery.setPatientIds(patientIds); BigInteger patientMaskForVariantInfoFilters = genomicProcessorRestClient.getPatientMask(distributableQuery).block(); System.out.println(patientMaskForVariantInfoFilters);