Skip to content

Commit

Permalink
updates to annotation functions for new "remove flagged submission" a…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
larrybabb committed Nov 20, 2024
1 parent 02b10a2 commit e27e204
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 71 deletions.
2 changes: 2 additions & 0 deletions scripts/clinvar-curartion/cvc-annotations-as-of-func.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ WITH anno AS
-- scv
scv_id,
scv_ver,
review_status,
-- annotation assessment record
curator,
annotated_on,
Expand Down Expand Up @@ -111,6 +112,7 @@ WITH anno AS
-- scv
a.scv_id,
a.scv_ver,
a.review_status,
-- annotation assessment record
a.curator,
a.annotated_on,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ WITH
av.vcv_id,
av.vcv_ver,
av.is_latest,
av.annotation_label
av.annotation_label,
av
FROM `clinvar_curator.cvc_annotations_view` av,
`clinvar_ingest.schema_on`(as_of_date) rel
WHERE
Expand Down Expand Up @@ -107,6 +108,7 @@ WITH
-- scv
a.scv_id,
a.scv_ver,
a.review_status,
-- annotation assessment record
a.curator,
a.annotated_on,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ WITH
(a.is_latest_annotation AND NOT a.is_deleted_scv) AND
a.action="no change" AND
a.is_outdated_scv
) AS outdated_nochange_count
) AS outdated_nochange_count,
COUNTIF(
(a.is_latest_annotation AND NOT a.is_deleted_scv) AND
(a.action="remove flagged submission" )
) AS remove_flagged_submission_count,
COUNTIF(
(a.is_latest_annotation AND NOT a.is_deleted_scv) AND
(
a.action="remove flagged submission") AND
a.is_outdated_scv
) AS outdated_remove_flagged_submission_count
FROM `clinvar_curator.cvc_annotations_as_of`(as_of_date, true, true) a
GROUP BY
a.release_date,
Expand All @@ -40,6 +50,8 @@ WITH
x.outdated_flagging_candidate_count,
x.nochange_count,
x.outdated_nochange_count,
x.remove_flagged_submission_count,
x.outdated_remove_flagged_submission_count,
MAX(scv.submission_date) as latest_submission_date,
x.release_date,
as_of_date
Expand All @@ -64,6 +76,8 @@ WITH
x.outdated_flagging_candidate_count,
x.nochange_count,
x.outdated_nochange_count,
x.remove_flagged_submission_count,
x.outdated_remove_flagged_submission_count,
x.release_date,
as_of_date
);
69 changes: 0 additions & 69 deletions scripts/clinvar-curartion/cvc-submitter-annotations-func.sql

This file was deleted.

0 comments on commit e27e204

Please sign in to comment.