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 haploid support to GnarlyGenotyper #7750

Merged
merged 3 commits into from
Jul 17, 2023
Merged

Conversation

ldgauthier
Copy link
Contributor

Addresses #7690

@gatk-bot
Copy link

gatk-bot commented Apr 4, 2022

Travis reported job failures from build 38445
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk11 38445.12 logs
integration openjdk8 38445.2 logs


for ( final Genotype g : vc.getGenotypes() ) {
final String name = g.getSampleName();
if(g.getPloidy() != ASSUMED_PLOIDY && !isGDBnoCall(g)) {
/*if(g.getPloidy() != ASSUMED_PLOIDY && !isGDBnoCall(g)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can delete this commented out section

/**
* Some legacy versions of GenomicsDB report no-calls as `0` or `.`
* @param g genotype to check
* @return true if this is a genotype that should be represented as a ploidy-aware, spec compliant no-call
*/
private static boolean isGDBnoCall(final Genotype g) {
return g.getPloidy() == 1 && (g.getAllele(0).isReference() || g.getAllele(0).isNoCall());
//return g.getPloidy() == 1 && (g.getAllele(0).isReference() || g.getAllele(0).isNoCall());
Copy link
Contributor

Choose a reason for hiding this comment

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

can remove this line

gb.attribute(GATKVCFConstants.GENOTYPE_QUALITY_BY_ALT_CONFIDENCE, ALTGQ);
gb.noPL();
}

/**
* Some legacy versions of GenomicsDB report no-calls as `0` or `.`
* @param g genotype to check
* @return true if this is a genotype that should be represented as a ploidy-aware, spec compliant no-call
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can update this comment since it's no longer checking the ploidy

@@ -1,5 +1,8 @@
package org.broadinstitute.hellbender.tools.walkers;

import com.google.errorprone.annotations.Var;
Copy link
Contributor

Choose a reason for hiding this comment

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

unused import

@@ -217,4 +224,26 @@ public void testOnEmptyAnnotations() {
Assert.assertEquals(sors.get(1), VCFConstants.MISSING_VALUE_v4);
}

@Test
public void testHaploidInput() {
final File haploidGVCF = new File(getToolTestDataDir(), "haploid.mini.g.vcf");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think haploid.mini.g.vcf is missing

@gatk-bot
Copy link

gatk-bot commented Jul 12, 2023

Github actions tests reported job failures from actions build 5533855739
Failures in the following jobs:

Test Type JDK Job ID Logs
integration 17.0.6+10 5533855739.11 logs
integration 17.0.6+10 5533855739.0 logs

Copy link
Contributor

@meganshand meganshand left a comment

Choose a reason for hiding this comment

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

👍 One quick question about a commented out test

@@ -53,13 +53,19 @@ public void assertThatExpectedOutputUpdateToggleIsDisabled() {
@DataProvider(name="VCFdata")
public Object[][] getVCFdata() {
return new Object[][]{
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you want this to be commented out?

@ldgauthier ldgauthier merged commit 7d900f5 into master Jul 17, 2023
20 checks passed
@ldgauthier ldgauthier deleted the ldg_gnarlyForHaploids branch July 17, 2023 19:16
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.

None yet

5 participants