Skip to content
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

VS-1395 Have create vat from vds optionally take sites only vcf #8851

Conversation

gbggrant
Copy link
Collaborator

@gbggrant gbggrant commented May 28, 2024

Modify GvsCreateVATFromVDS to take as an optional input the sites_only_vcf - if provided, the code bypasses the logic to create it from VDS.
This PR also modifies IndexVcf and SelectVariants to use localization_optional for their inputs.

Updated Passing Integration test here
Rerun of GvsCreateVATFromVDS using a passed in sites_only VCF here.
Rerun of GvsCreateVATFromVDS NOT using a passed in sites_only VCF here.

@gbggrant gbggrant marked this pull request as ready for review May 30, 2024 11:22
scripts/variantstore/wdl/GvsQuickstartIntegration.wdl Outdated Show resolved Hide resolved
@@ -1307,3 +1309,47 @@ task PopulateFilterSetInfo {
File monitoring_log = "monitoring.log"
}
}

# TODO - should put in a do not overwrite that file logic
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this going to be covered by this PR/ticket or a subsequent one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make a ticket for that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I ended up doing that work in this PR>

scripts/variantstore/wdl/GvsUtils.wdl Outdated Show resolved Hide resolved
@gbggrant gbggrant requested a review from rsasch May 30, 2024 14:06
scripts/variantstore/wdl/GvsCreateVATfromVDS.wdl Outdated Show resolved Hide resolved
hail_generate_sites_only_script_path = select_first([hail_generate_sites_only_script_path]),
ancestry_file_path = MakeSubpopulationFilesAndReadSchemaFiles.ancestry_file_path,
workspace_bucket = GetToolVersions.workspace_bucket,
region = "us-central1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is preexisting but IMHO the region should be out in a declaration rather than hardcoded

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and definitely no need to consult git blame on the baseline code

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken care of .

scripts/variantstore/wdl/GvsCreateVATfromVDS.wdl Outdated Show resolved Hide resolved
scripts/variantstore/wdl/GvsCreateVATfromVDS.wdl Outdated Show resolved Hide resolved
scripts/variantstore/wdl/GvsCreateVATfromVDS.wdl Outdated Show resolved Hide resolved
input_vcf = GenerateSitesOnlyVcf.sites_only_vcf,
gatk_docker = effective_gatk_docker,
input_file = select_first([sites_only_vcf_index, IndexVcf.output_vcf_index]),
output_gcs_dir = output_path + "sites_only_vcf",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure there will be a trailing slash on output_path?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added code to validate that it does end with a trailing slash.

scripts/variantstore/wdl/GvsUtils.wdl Outdated Show resolved Hide resolved
@gbggrant gbggrant requested a review from mcovarr June 4, 2024 01:55
if (!defined(split_intervals_scatter_count)) {
call Utils.GetBQTableLastModifiedDatetime as SampleDateTime {
String output_path_without_a_trailing_slash = sub(output_path, "/$", "")
if (output_path == output_path_without_a_trailing_slash) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice


call Utils.GetNumSamplesLoaded {
if (!defined(sites_only_vcf) && ((!defined(vds_path) || !defined(hail_generate_sites_only_script_path)))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe treat the two cases separately? If sites_only_vcf then those other two params really shouldn't be?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I wondered about it. I kind of figured there's no harm if a user leaves an unneeded parameter defined, but it could cause confusion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay - did that

@gbggrant gbggrant requested a review from mcovarr June 6, 2024 17:42
@gbggrant gbggrant merged commit 27133bd into ah_var_store Jun 10, 2024
17 checks passed
@gbggrant gbggrant deleted the gg_VS-1395_Have_CreateVATFromVDS_OptionallyTakeSitesOnlyVCF branch June 10, 2024 16:41
gbggrant added a commit that referenced this pull request Jun 10, 2024
* Have GvsCreateVATfromVDS.wdl take sites-only-vcf as an optional input.
* Added logic to allow/disallow CopyFile to overwrite.
gbggrant added a commit that referenced this pull request Jun 20, 2024
…callset version (#8866)

* VS-1395 Have create vat from vds optionally take sites only vcf (#8851)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants