Skip to content

Commit

Permalink
try to fix mutation part SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhaoyuan committed Oct 7, 2024
1 parent 21a60c3 commit 20c7db4
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
genetic_profile.name AS label,
count(sample_profile.genetic_profile_id) AS count
FROM sample_profile
JOIN sample_derived ON sample_profile.sample_id=sample_derived.internal_id
JOIN genetic_profile on sample_profile.genetic_profile_id = genetic_profile.genetic_profile_id
LEFT JOIN sample_derived ON sample_profile.sample_id=sample_derived.internal_id
LEFT JOIN genetic_profile on sample_profile.genetic_profile_id = genetic_profile.genetic_profile_id
<where>
genetic_profile.genetic_alteration_type != 'MUTATION_EXTENDED' AND
<include refid="applyStudyViewFilter">
Expand All @@ -155,11 +155,10 @@
JOIN sample_derived sd ON sgp.sample_unique_id = sd.sample_unique_id
JOIN sample_profile sp ON sd.internal_id = sp.sample_id
JOIN genetic_profile gp ON sp.genetic_profile_id = gp.genetic_profile_id
WHERE
<include refid="applyStudyViewFilter">
<property name="filter_type" value="'SAMPLE_ID_ONLY'"/>
</include>
WHERE
sgp.sample_unique_id IN (<include refid="sampleUniqueIdsFromStudyViewFilter"/>)
AND sgp.alteration_type = 'MUTATION_EXTENDED'
GROUP BY gp.stable_id, gp.name
</select>

<!-- for /sample-lists-counts/fetch (returns CaseListDataCount) -->
Expand Down

0 comments on commit 20c7db4

Please sign in to comment.