Skip to content

Commit

Permalink
ALS-5905: Fix genomic configuration for HPDS with no genomic data
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Feb 20, 2024
1 parent 47098c4 commit f54e2b8
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ public GenomicProcessor remoteGenomicProcessor(@Value("${hpds.genomicProcessor.r
// todo: validate remote processors are valid
return new GenomicProcessorParentImpl(genomicProcessors);
}

@Bean
@ConditionalOnProperty(prefix = "hpds.genomicProcessor", name = "impl", matchIfMissing = true)
public GenomicProcessor noOpGenomicProcessor() {
return new GenomicProcessorNoOp();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package edu.harvard.hms.dbmi.avillach.hpds.processing;

import edu.harvard.hms.dbmi.avillach.hpds.data.genotype.InfoColumnMeta;
import edu.harvard.hms.dbmi.avillach.hpds.data.genotype.VariantMasks;
import edu.harvard.hms.dbmi.avillach.hpds.data.genotype.caching.VariantBucketHolder;
import reactor.core.publisher.Mono;

import java.math.BigInteger;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;

public class GenomicProcessorNoOp implements GenomicProcessor {
@Override
public Mono<BigInteger> getPatientMask(DistributableQuery distributableQuery) {
return null;
}

@Override
public Set<Integer> patientMaskToPatientIdSet(BigInteger patientMask) {
return null;
}

@Override
public BigInteger createMaskForPatientSet(Set<Integer> patientSubset) {
return null;
}

@Override
public Mono<Collection<String>> getVariantList(DistributableQuery distributableQuery) {
return null;
}

@Override
public List<String> getPatientIds() {
return null;
}

@Override
public Optional<VariantMasks> getMasks(String path, VariantBucketHolder<VariantMasks> variantMasksVariantBucketHolder) {
return Optional.empty();
}

@Override
public Set<String> getInfoStoreColumns() {
return null;
}

@Override
public Set<String> getInfoStoreValues(String conceptPath) {
return null;
}

@Override
public List<InfoColumnMeta> getInfoColumnMeta() {
return null;
}
}
3 changes: 3 additions & 0 deletions service/src/main/resources/application-open.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SMALL_JOB_LIMIT = 100
SMALL_TASK_THREADS = 1
LARGE_TASK_THREADS = 1
11 changes: 1 addition & 10 deletions service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
SMALL_JOB_LIMIT = 100
SMALL_TASK_THREADS = 1
LARGE_TASK_THREADS = 1

#hpds.genomicProcessor.impl=local
#HPDS_GENOMIC_DATA_DIRECTORY=/opt/local/hpds/all/

#hpds.genomicProcessor.impl=localDistributed
#HPDS_GENOMIC_DATA_DIRECTORY=/opt/local/hpds/phs0000946/

hpds.genomicProcessor.impl=remote
hpds.genomicProcessor.remoteHosts=http://localhost:8090/,http://localhost:8091/
LARGE_TASK_THREADS = 1

0 comments on commit f54e2b8

Please sign in to comment.