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

Add ReshardVcf workflow #613

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Add ReshardVcf workflow #613

merged 2 commits into from
Nov 16, 2023

Conversation

mwalker174
Copy link
Collaborator

This workflow takes a set of vcfs and shards them by contig. The method uses bcftools concat with --regions to pull records from all vcfs for each contig.

This workflow will be needed at the end of ResolveComplexVariants. This is because the contig-sharded vcfs produced in that workflow may contain a small number of records from other contigs, but downstream CleanVcf requires the input vcfs to be strictly contig sharded.

Tested on reference panel outputs from GenotypeComplexVariants.


scatter (i in range(length(vcfs))) {
File vcf_indexes = vcfs[i] + ".tbi"
}
Copy link
Member

@VJalili VJalili Oct 24, 2023

Choose a reason for hiding this comment

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

Would it be useful to add an optional input Array[File]? vcf_indexes and fall back to constructing the indexes based on the input VCFs if the optional input was not provided? I think it can be helpful to hint to a user if indexes are needed and provide them with an option of explicitly providing them (e.g., if they are on a different 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.

As a convention we always require input VCFs to have indexes for top-level workflows. These are already generated by the pipeline so shouldn't cause any problems as long as the VCFs were not manually moved without their indexes.

Copy link
Member

@VJalili VJalili left a comment

Choose a reason for hiding this comment

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

Thank you, @mwalker174! LGTM! I only added a comment.

@mwalker174 mwalker174 changed the title Add VcfReshard workflow Add ReshardVcf workflow Nov 16, 2023
@mwalker174 mwalker174 merged commit b064df2 into main Nov 16, 2023
2 checks passed
@mwalker174 mwalker174 deleted the mw_vcf_reshard branch November 16, 2023 19:56
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.

2 participants