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

Enabled GVCF type filtering support in SelectVariants #7193

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

michaelgatzen
Copy link
Contributor

Dependent on HTSJDK release after samtools/htsjdk#1544

Fixes #7111

  • Added optional argument --ignore-non-ref-in-types to support correct handling of VariantContexts that contain a NON_REF allele
  • Default behavior does not change
  • Note that this only enables correct handling of GVCF input. The filtered output files are VCF (not GVCF) files, since reference blocks are not extended when a variant is filtered out
  • Added integration test


final IntegrationTestSpec spec = new IntegrationTestSpec(
baseTestString(" --select-type-to-include SNP --ignore-non-ref-in-types ",testFile),
Collections.singletonList(getToolTestDataDir() + "expected/" + "testSelectVariants_VariantTypeSelectionForGVCF.vcf")
Copy link
Contributor

Choose a reason for hiding this comment

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

We've been trying to move away from brittle exact match integration tests, but I think that this is fine here since there are no opportunities for numerical changes.

Copy link
Contributor

@ldgauthier ldgauthier left a comment

Choose a reason for hiding this comment

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

Awesome, very useful!

@kachulis
Copy link
Contributor

@michaelgatzen is this ready to be merged?

@michaelgatzen michaelgatzen marked this pull request as ready for review February 13, 2023 19:06
@michaelgatzen
Copy link
Contributor Author

@kachulis It is, although Travis says there's a build error and the data of the run isn't available anymore.

@droazen Is there a way to rerun Travis?

@michaelgatzen michaelgatzen self-assigned this Feb 13, 2023
@michaelgatzen
Copy link
Contributor Author

I remember now why this was a draft for the longest time, and also probably why Travis failed - this was waiting for a release of htsjdk after samtools/htsjdk#1544, but I see that GATK master is using 3.0.1, which does include that htsjdk PR. It's probably still a good idea to run Travis

- Added optional argument `--ignore-non-ref-in-types` to support correct handling of VariantContexts that contain a NON_REF allele
- Default behavior does not change
- Note that this only enables correct handling of GVCF input. The filtered output files are VCF (not GVCF) files, since reference blocks are not extended when a variant is filtered out
- Added integration test
@michaelgatzen michaelgatzen force-pushed the mg_gvcf_aware_varianttypesvariantfilter branch from e9ca277 to 298037f Compare February 13, 2023 21:12
@michaelgatzen michaelgatzen merged commit 692e7a3 into master Feb 15, 2023
@michaelgatzen michaelgatzen deleted the mg_gvcf_aware_varianttypesvariantfilter branch February 15, 2023 21:03
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.

SelectVariants cannot filter variant types for GVCFs (VariantTypesVariantFilter)
3 participants