-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail Avro extract and callset stats on bad filter name [VS-655] #8046
Merged
mcovarr
merged 9 commits into
ah_var_store
from
vs_655_avro_extract_warn_on_bad_filter_name
Oct 7, 2022
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b572107
Check filter set name before running Avro extract [VS-655]
mcovarr 3f8328c
dockstore
mcovarr 8d2e10c
um
mcovarr 1ede0f9
words
mcovarr 6b288d8
PR feedback
mcovarr 286c725
oops
mcovarr 66fbedd
dockstore
mcovarr 76da384
Update scripts/variantstore/wdl/GvsUtils.wdl
mcovarr d0b9568
remove location
mcovarr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,7 @@ workflow GvsExtractCallset { | |
} | ||
|
||
if ( !do_not_filter_override ) { | ||
call ValidateFilterSetName { | ||
call Utils.ValidateFilterSetName { | ||
input: | ||
query_project = query_project, | ||
filter_set_name = filter_set_name, | ||
|
@@ -138,6 +138,7 @@ workflow GvsExtractCallset { | |
|
||
call ExtractTask { | ||
input: | ||
go = select_first([ValidateFilterSetName.done, true]), | ||
dataset_id = dataset_name, | ||
call_set_identifier = call_set_identifier, | ||
gatk_override = gatk_override, | ||
|
@@ -156,7 +157,6 @@ workflow GvsExtractCallset { | |
fq_filter_set_site_table = fq_filter_set_site_table, | ||
fq_filter_set_tranches_table = fq_filter_set_tranches_table, | ||
filter_set_name = filter_set_name, | ||
filter_set_name_verified = select_first([ValidateFilterSetName.done, "done"]), | ||
drop_state = drop_state, | ||
output_file = vcf_filename, | ||
output_gcs_dir = output_gcs_dir, | ||
|
@@ -207,52 +207,11 @@ workflow GvsExtractCallset { | |
} | ||
} | ||
|
||
task ValidateFilterSetName { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🥇 |
||
input { | ||
String filter_set_name | ||
String data_project | ||
String data_dataset | ||
String query_project | ||
String filter_set_info_timestamp | ||
} | ||
meta { | ||
# Not `volatile: true` since there shouldn't be a need to re-run this if there has already been a successful execution. | ||
} | ||
|
||
# add labels for DSP Cloud Cost Control Labeling and Reporting | ||
String bq_labels = "--label service:gvs --label team:variants --label managedby:extract_callset" | ||
|
||
command <<< | ||
set -ex | ||
|
||
echo "project_id = ~{query_project}" > ~/.bigqueryrc | ||
|
||
OUTPUT=$(bq --location=US --project_id=~{query_project} --format=csv query --use_legacy_sql=false ~{bq_labels} "SELECT filter_set_name as available_filter_set_names FROM \`~{data_project}.~{data_dataset}.filter_set_info\` GROUP BY filter_set_name") | ||
FILTERSETS=${OUTPUT#"available_filter_set_names"} | ||
|
||
if [[ $FILTERSETS =~ "~{filter_set_name}" ]]; then | ||
echo "Filter set name '~{filter_set_name}' found." | ||
else | ||
echo "ERROR: '~{filter_set_name}' is not an existing filter_set_name. Available in ~{data_project}.~{data_dataset} are" | ||
echo $FILTERSETS | ||
exit 1 | ||
fi | ||
>>> | ||
output { | ||
String done = read_string(stdout()) | ||
} | ||
|
||
runtime { | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:398.0.0" | ||
memory: "3 GB" | ||
disks: "local-disk 10 HDD" | ||
preemptible: 3 | ||
cpu: 1 | ||
} | ||
} | ||
|
||
task ExtractTask { | ||
input { | ||
Boolean go | ||
|
||
String dataset_id | ||
String call_set_identifier | ||
|
||
|
@@ -283,7 +242,6 @@ task ExtractTask { | |
String fq_filter_set_site_table | ||
String fq_filter_set_tranches_table | ||
String? filter_set_name | ||
String filter_set_name_verified | ||
|
||
# Runtime Options: | ||
File? gatk_override | ||
|
@@ -398,9 +356,9 @@ task SumBytes { | |
print(total_mb);" | ||
>>> | ||
runtime { | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:398.0.0" | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:404.0.0-alpine" | ||
memory: "3 GB" | ||
disks: "local-disk 10 HDD" | ||
disks: "local-disk 500 HDD" | ||
preemptible: 3 | ||
cpu: 1 | ||
} | ||
|
@@ -437,9 +395,9 @@ task CreateManifest { | |
} | ||
|
||
runtime { | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:398.0.0" | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:404.0.0-alpine" | ||
memory: "3 GB" | ||
disks: "local-disk 10 HDD" | ||
disks: "local-disk 500 HDD" | ||
koncheto-broad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
preemptible: 3 | ||
cpu: 1 | ||
} | ||
|
@@ -479,9 +437,9 @@ task GenerateSampleListFile { | |
} | ||
|
||
runtime { | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:398.0.0" | ||
docker: "gcr.io/google.com/cloudsdktool/cloud-sdk:404.0.0-alpine" | ||
memory: "3 GB" | ||
disks: "local-disk 10 HDD" | ||
disks: "local-disk 500 HDD" | ||
preemptible: 3 | ||
cpu: 1 | ||
} | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smart to reuse this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rsasch gets the credit for suggesting this! 😄