-
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.
ALS-4978: Incomplete commit -- begin to separate phenotypic and genom…
…ic processing
- Loading branch information
Showing
3 changed files
with
104 additions
and
58 deletions.
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
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
44 changes: 44 additions & 0 deletions
44
...ssing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/DistributableQuery.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,44 @@ | ||
package edu.harvard.hms.dbmi.avillach.hpds.processing; | ||
|
||
import edu.harvard.hms.dbmi.avillach.hpds.data.query.Query; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class DistributableQuery { | ||
|
||
private Query genomicQuery; | ||
private List<Set<Integer>> phenotypicQueryPatientSets; | ||
|
||
public DistributableQuery() { | ||
genomicQuery = new Query(); | ||
phenotypicQueryPatientSets = new ArrayList<>(); | ||
} | ||
|
||
public Query getGenomicQuery() { | ||
return genomicQuery; | ||
} | ||
|
||
public List<Set<Integer>> getPhenotypicQueryPatientSets() { | ||
return phenotypicQueryPatientSets; | ||
} | ||
|
||
public void addAndClausePatients(Set<Integer> patientSet) { | ||
synchronized (patientSet) { | ||
phenotypicQueryPatientSets.add(patientSet); | ||
} | ||
} | ||
|
||
public void addRequiredVariantField(String path) { | ||
synchronized (genomicQuery) { | ||
genomicQuery.getRequiredFields().add(path); | ||
} | ||
} | ||
|
||
public void addVariantSpecCategoryFilter(String key, String[] categoryFilters) { | ||
synchronized (genomicQuery) { | ||
genomicQuery.getCategoryFilters().put(key, categoryFilters); | ||
} | ||
} | ||
} |