Skip to content

Commit

Permalink
Changes from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed Oct 10, 2024
1 parent f3f64c2 commit beab7a3
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<String> variants = (List<String>) objectInputStream.readObject();
return variants.toArray(new String[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ public interface GenomicProcessor {

List<InfoColumnMeta> getInfoColumnMeta();

// todo: make the map value a Set instead of array
Map<String, Set<String>> getVariantMetadata(Collection<String> variantList);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}
1 change: 0 additions & 1 deletion service/src/main/resources/application-bdc-auth.properties
Original file line number Diff line number Diff line change
@@ -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/
Expand Down

0 comments on commit beab7a3

Please sign in to comment.