Skip to content

Commit

Permalink
Sample Retrieval
Browse files Browse the repository at this point in the history
- Add versionRange to pom.xml to conform to specifications
- Add ClickHouseDB query for retrieving sample_ids from sample table based on attribute
  • Loading branch information
JREastonMarks committed May 17, 2023
1 parent f1efaf9 commit 5848c47
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</trim>
</where>
</if>
<if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
<!-- <if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
INTERSECT
SELECT sample_unique_id
FROM sample
Expand All @@ -103,6 +103,27 @@
</foreach>
</trim>
)
</if> -->
<if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
<foreach item="clinicalDataFilter" collection="clinicalDataFilters" open="INTERSECT" separator="INTERSECT">
SELECT sample_unique_id
FROM sample_clinical_attribute_numeric
WHERE attribute_name = '${clinicalDataFilter.attributeId}'
<foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
<trim prefix="" prefixOverrides="AND">
<if test="dataFilterValue.value eq 'NA'">
AND attribute_value = -1000000
</if>
<if test="dataFilterValue.start != null">
AND attribute_value &gt; ${dataFilterValue.start}
</if>
<if test="dataFilterValue.end != null">
AND attribute_value &lt;= ${dataFilterValue.end}
</if>
</trim>
</foreach>
</foreach>
)
</if>
<!-- ... extend for other elements of the StudyViewFilter object -->
</trim>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,7 @@
<goals>
<goal>execute</goal>
</goals>
<versionRange></versionRange>
</pluginExecutionFilter>
<action>
<ignore/>
Expand Down

0 comments on commit 5848c47

Please sign in to comment.