From beab7a32b60277ded67c4a7a3bc64f0becef7f60 Mon Sep 17 00:00:00 2001 From: Ryan Amari Date: Thu, 10 Oct 2024 09:55:00 -0400 Subject: [PATCH] Changes from PR --- .../dbmi/avillach/hpds/data/genotype/VariantStore.java | 4 +--- .../avillach/hpds/processing/AbstractProcessor.java | 1 - .../avillach/hpds/processing/GenomicProcessor.java | 1 - .../avillach/hpds/processing/VariantIndexCache.java | 1 - .../avillach/hpds/processing/VariantUtilsTest.java | 10 ++++++++++ .../src/main/resources/application-bdc-auth.properties | 1 - 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/data/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/data/genotype/VariantStore.java b/data/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/data/genotype/VariantStore.java index 99cdce9e..b62dd496 100644 --- a/data/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/data/genotype/VariantStore.java +++ b/data/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/data/genotype/VariantStore.java @@ -21,8 +21,6 @@ public class VariantStore implements Serializable { private static Logger log = LoggerFactory.getLogger(VariantStore.class); public static final int BUCKET_SIZE = 1000; - public static final String VARIANT_SPEC_INDEX_FILE = VARIANT_SPEC_INDEX_JAVABIN_FILENAME; - private BigInteger emptyBitmask; private String[] patientIds; @@ -157,7 +155,7 @@ public BigInteger emptyBitmask() { @SuppressWarnings("unchecked") public static String[] loadVariantIndexFromFile(String genomicDataDirectory) { - try (ObjectInputStream objectInputStream = new ObjectInputStream(new GZIPInputStream(new FileInputStream(genomicDataDirectory + "/" + VARIANT_SPEC_INDEX_FILE)));){ + try (ObjectInputStream objectInputStream = new ObjectInputStream(new GZIPInputStream(new FileInputStream(genomicDataDirectory + "/" + VARIANT_SPEC_INDEX_JAVABIN_FILENAME)));){ List variants = (List) objectInputStream.readObject(); return variants.toArray(new String[0]); diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/AbstractProcessor.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/AbstractProcessor.java index d94fda0e..88e80165 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/AbstractProcessor.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/AbstractProcessor.java @@ -342,7 +342,6 @@ public PhenoCube load(String key) throws Exception { return ret; }else { log.warn("ColumnMeta not found for : [{}]", key); - log.info(Joiner.on(",").join(phenotypeMetaStore.getColumnNames())); return null; } } diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessor.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessor.java index 157b6b11..855acea4 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessor.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/GenomicProcessor.java @@ -29,6 +29,5 @@ public interface GenomicProcessor { List getInfoColumnMeta(); - // todo: make the map value a Set instead of array Map> getVariantMetadata(Collection variantList); } diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantIndexCache.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantIndexCache.java index 10e2213a..be05501c 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantIndexCache.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantIndexCache.java @@ -79,7 +79,6 @@ public VariantIndex load(String infoColumn_valueKey) throws IOException { boolean[] variantIndexArray = new boolean[variantIndex.length]; int x = 0; for(Integer variantIndex : variantIndexIntArray) { - // todo: shouldn't this be greater than or equal to 0? 0 is a valid index if (variantIndex >= 0) { variantIndexArray[variantIndex] = true; } diff --git a/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantUtilsTest.java b/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantUtilsTest.java index 5971ee68..874c21ce 100644 --- a/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantUtilsTest.java +++ b/processing/src/test/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantUtilsTest.java @@ -14,4 +14,14 @@ public void pathIsVariantSpec_oldFormat() { public void pathIsVariantSpec_newFormat() { assertTrue(VariantUtils.pathIsVariantSpec("chr21,5032061,A,G,LOC102723996,missense_variant")); } + + @Test + public void pathIsVariantSpec_notMatching() { + assertFalse(VariantUtils.pathIsVariantSpec("chr21,5032061,A,Z,LOC102723996,missense_variant")); + assertFalse(VariantUtils.pathIsVariantSpec("chr21,5032061,Q,G,LOC102723996,missense_variant")); + assertFalse(VariantUtils.pathIsVariantSpec("chr21,5032061,A,G,LOC102723996")); + assertFalse(VariantUtils.pathIsVariantSpec("chr21,5032061,A,G,^&*,missense_variant")); + assertFalse(VariantUtils.pathIsVariantSpec("chr21,5032061,A,G,LOC102723996,&*(")); + assertFalse(VariantUtils.pathIsVariantSpec("chr21,ABC,A,G,LOC102723996,missense_variant")); + } } \ No newline at end of file diff --git a/service/src/main/resources/application-bdc-auth.properties b/service/src/main/resources/application-bdc-auth.properties index e5a45446..272b84ec 100644 --- a/service/src/main/resources/application-bdc-auth.properties +++ b/service/src/main/resources/application-bdc-auth.properties @@ -1,7 +1,6 @@ SMALL_JOB_LIMIT = 100 SMALL_TASK_THREADS = 1 LARGE_TASK_THREADS = 1 -VCF_EXCERPT_ENABLED=true hpds.genomicProcessor.impl=localPatientDistributed HPDS_GENOMIC_DATA_DIRECTORY=/opt/local/hpds/all/