From e3dadcd123f5151b7c3592614d4c5f9e8088565f Mon Sep 17 00:00:00 2001 From: Laura Gauthier Date: Fri, 29 Mar 2019 12:55:04 -0400 Subject: [PATCH] Fix ReblockGVCF NPE on no-calls Copy AS annotations too Put RAW_MQandDP back to int tuple so GDB doesn't duck it up Fix MQ bug, upgrade from experimental to beta --- .../walkers/annotator/AnnotationUtils.java | 54 ++++- .../walkers/annotator/InbreedingCoeff.java | 6 +- .../allelespecific/AS_RankSumTest.java | 11 +- .../allelespecific/AS_StrandBiasTest.java | 36 ++-- .../walkers/variantutils/ReblockGVCF.java | 113 ++++++---- .../AS_BaseQualityRankSumTestUnitTest.java | 3 +- .../ReblockGVCFIntegrationTest.java | 31 ++- .../variantutils/ReblockGVCFUnitTest.java | 15 ++ .../large/testProductionGVCF.expected.g.vcf | 4 +- ...ed.NA12878.AS.chr20snippet.reblocked.g.vcf | 198 ++++++++++++++++++ ...ed.NA12892.AS.chr20snippet.reblocked.g.vcf | 154 ++++++++++++++ ...prod.chr20snippet.withRawMQ.expected.g.vcf | 20 +- .../testJustOneSample.expected.g.vcf | 22 +- .../testNonRefADCorrection.expected.g.vcf | 16 +- .../testOneSampleAsForGnomAD.expected.g.vcf | 8 +- 15 files changed, 605 insertions(+), 86 deletions(-) create mode 100644 src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12878.AS.chr20snippet.reblocked.g.vcf create mode 100644 src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12892.AS.chr20snippet.reblocked.g.vcf diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/AnnotationUtils.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/AnnotationUtils.java index a5ea9ea7ce4..d9168a3f2a6 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/AnnotationUtils.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/AnnotationUtils.java @@ -4,15 +4,21 @@ import htsjdk.samtools.CigarElement; import htsjdk.samtools.CigarOperator; import htsjdk.samtools.SAMRecord; +import htsjdk.variant.variantcontext.Allele; import org.apache.commons.lang.StringUtils; +import org.broadinstitute.hellbender.tools.walkers.annotator.allelespecific.*; import org.broadinstitute.hellbender.utils.pairhmm.PairHMM; import org.broadinstitute.hellbender.utils.read.AlignmentUtils; import org.broadinstitute.hellbender.utils.read.GATKRead; -import java.util.ArrayList; -import java.util.List; +import javax.sound.sampled.Line; +import java.util.*; public final class AnnotationUtils { + public static final String ALLELE_SPECIFIC_SPLIT_DELIM = "\\|"; //String.split takes a regex, so we need to escape the pipe + public static final String ALLELE_SPECIFIC_PRINT_DELIM = "|"; + public static final String ALLELE_SPECIFIC_REDUCED_DELIM = ","; + private AnnotationUtils(){} public static final String LIST_DELIMITER = ","; @@ -39,4 +45,48 @@ public static String encodeStringList( final List stringList) { return StringUtils.join(stringList, ","); } + /** + * Helper function to convert a List of Strings to a comma-separated String + * @param somethingList the ArrayList with String data + * @return a comma-separated String + */ + public static String encodeAnyASList( final List somethingList) { + return StringUtils.join(somethingList, ALLELE_SPECIFIC_PRINT_DELIM).replaceAll("\\[|\\]", ""); //Who actually wants brackets at the ends of their string? Who??? + } + + /** + * Helper function to determine if an annotation is allele-specific + * @param annotation the annotation to be tested + * @return true if the annotation is expected to have values per-allele + */ + public static boolean isAlleleSpecific(final InfoFieldAnnotation annotation) { + if (annotation instanceof AS_RankSumTest) { + return true; + } + if (annotation instanceof AS_StrandBiasTest) { + return true; + } + if (annotation instanceof AS_RMSMappingQuality) { + return true; + } + if (annotation instanceof AS_StandardAnnotation) { + return true; + } + return false; + } + + /** + * Handles all the Java and htsjdk parsing shenanigans + * @param rawDataString should not have surrounding brackets + * @return + */ + public static List getAlleleLengthListOfString(String rawDataString) { + if (rawDataString == null) { + return Collections.emptyList(); + } + if (rawDataString.startsWith("[")) { + rawDataString = rawDataString.substring(1, rawDataString.length() - 1).replaceAll("\\s", ""); + } + return Arrays.asList(rawDataString.split(ALLELE_SPECIFIC_SPLIT_DELIM)); + } } diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/InbreedingCoeff.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/InbreedingCoeff.java index 9a1c63c4f6a..d57ef1b0aae 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/InbreedingCoeff.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/InbreedingCoeff.java @@ -14,6 +14,7 @@ import org.broadinstitute.hellbender.utils.Utils; import org.broadinstitute.hellbender.utils.genotyper.ReadLikelihoods; import org.broadinstitute.hellbender.utils.help.HelpConstants; +import org.broadinstitute.hellbender.utils.logging.OneShotLogger; import org.broadinstitute.hellbender.utils.variant.GATKVCFConstants; import java.io.File; @@ -49,7 +50,7 @@ @DocumentedFeature(groupName=HelpConstants.DOC_CAT_ANNOTATORS, groupSummary=HelpConstants.DOC_CAT_ANNOTATORS_SUMMARY, summary="Likelihood-based test for the consanguinity among samples (InbreedingCoeff)") public final class InbreedingCoeff extends PedigreeAnnotation implements StandardAnnotation { - private static final Logger logger = LogManager.getLogger(InbreedingCoeff.class); + private static final OneShotLogger logger = new OneShotLogger(InbreedingCoeff.class); private static final int MIN_SAMPLES = 10; private static final boolean ROUND_GENOTYPE_COUNTS = false; @@ -72,13 +73,14 @@ public Map annotate(final ReferenceContext ref, Utils.nonNull(vc); final GenotypesContext genotypes = getFounderGenotypes(vc); if (genotypes == null || genotypes.size() < MIN_SAMPLES || !vc.isVariant()) { + logger.warn("InbreedingCoeff will not be calculated; at least " + MIN_SAMPLES + " samples must have called genotypes"); return Collections.emptyMap(); } final Pair sampleCountCoeff = calculateIC(vc, genotypes); final int sampleCount = sampleCountCoeff.getLeft(); final double F = sampleCountCoeff.getRight(); if (sampleCount < MIN_SAMPLES) { - logger.warn("Annotation will not be calculated, must provide at least " + MIN_SAMPLES + " samples"); + logger.warn("InbreedingCoeff will not be calculated for at least one position; at least " + MIN_SAMPLES + " samples must have called genotypes"); return Collections.emptyMap(); } return Collections.singletonMap(getKeyNames().get(0), String.format("%.4f", F)); diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_RankSumTest.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_RankSumTest.java index 6374f8bfe7a..bd7ab34f1dc 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_RankSumTest.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_RankSumTest.java @@ -23,10 +23,7 @@ */ public abstract class AS_RankSumTest extends RankSumTest implements ReducibleAnnotation { private static final Logger logger = LogManager.getLogger(AS_RankSumTest.class); - public static final String SPLIT_DELIM = "\\|"; //String.split takes a regex, so we need to escape the pipe - public static final String PRINT_DELIM = "|"; public static final String RAW_DELIM = ","; - public static final String REDUCED_DELIM = ","; @Override public Map annotate(final ReferenceContext ref, @@ -136,7 +133,7 @@ protected String makeRawAnnotationString(final List vcAlleles, final Map for (int i = 0; i< vcAlleles.size(); i++) { if (!vcAlleles.get(i).isReference()) { if (i != 0) { //strings will always start with a printDelim because we won't have values for the reference allele, but keep this for consistency with other annotations - annotationString += PRINT_DELIM; + annotationString += AnnotationUtils.ALLELE_SPECIFIC_PRINT_DELIM; } final Double alleleValue = perAlleleValues.get(vcAlleles.get(i)); //can be null if there are no ref reads @@ -253,7 +250,7 @@ protected void parseRawDataString(final ReducibleAnnotationData myDat } //TODO handle misformatted annotation field more gracefully //rawDataPerAllele is a per-sample list of the rank sum statistic for each allele - final String[] rawDataPerAllele = rawDataNoBrackets.split(SPLIT_DELIM); + final String[] rawDataPerAllele = rawDataNoBrackets.split(AnnotationUtils.ALLELE_SPECIFIC_SPLIT_DELIM); for (int i=0; i vcAlleles, fina for (int i = 0; i< vcAlleles.size(); i++) { if (!vcAlleles.get(i).isReference()) { if (i != 0) { //strings will always start with a printDelim because we won't have values for the reference allele, but keep this for consistency with other annotations - annotationString += PRINT_DELIM; + annotationString += AnnotationUtils.ALLELE_SPECIFIC_PRINT_DELIM; } final Histogram alleleValue = perAlleleValues.get(vcAlleles.get(i)); //can be null if there are no ref reads diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_StrandBiasTest.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_StrandBiasTest.java index 15cd45aa3c2..f666a249c33 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_StrandBiasTest.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_StrandBiasTest.java @@ -6,6 +6,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.broadinstitute.hellbender.engine.ReferenceContext; +import org.broadinstitute.hellbender.tools.walkers.annotator.AnnotationUtils; import org.broadinstitute.hellbender.tools.walkers.annotator.StrandBiasTest; import org.broadinstitute.hellbender.utils.genotyper.ReadLikelihoods; import org.broadinstitute.hellbender.utils.pileup.PileupElement; @@ -165,32 +166,25 @@ public Map finalizeRawData(final VariantContext vc, final Varia } protected void parseRawDataString(ReducibleAnnotationData> myData) { - String rawDataString = myData.getRawData(); - if (rawDataString.startsWith("[")) { - rawDataString = rawDataString.substring(1,rawDataString.length()-1); + List values = AnnotationUtils.getAlleleLengthListOfString(myData.getRawData()); + if (values.size() != myData.getAlleles().size()) { + throw new IllegalStateException("Number of alleles and number of allele-specific entries do not match. " + + "Allele-specific annotations should have an entry for each allele including the reference."); } - String[] rawDataPerAllele; - String[] rawListEntriesAsStringVector; + Map> perAlleleValues = new HashMap<>(); - //Initialize maps - for (Allele current : myData.getAlleles()) { - perAlleleValues.put(current, new LinkedList()); - } - //rawDataPerAllele is the list of values for each allele (each of variable length) - rawDataPerAllele = rawDataString.split(SPLIT_DELIM); - for (int i=0; i alleleList = perAlleleValues.get(myData.getAlleles().get(i)); - rawListEntriesAsStringVector = alleleData.split(","); - //Read counts will only ever be integers - for (String s : rawListEntriesAsStringVector) { - if (!s.isEmpty()) { - alleleList.add(Integer.parseInt(s.trim())); - } + for (int i = 0; i < values.size(); i++) { + List perAlleleList = new ArrayList<>(); + String[] rawListEntriesAsStringVector = values.get(i).split(","); + //Read counts will only ever be integers + for (String s : rawListEntriesAsStringVector) { + if (!s.isEmpty()) { + perAlleleList.add(Integer.parseInt(s.trim())); } } + perAlleleValues.put(myData.getAlleles().get(i), perAlleleList); } + myData.setAttributeMap(perAlleleValues); } diff --git a/src/main/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF.java b/src/main/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF.java index e751bd6a84a..b404753edb7 100644 --- a/src/main/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF.java +++ b/src/main/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF.java @@ -10,7 +10,10 @@ import org.broadinstitute.hellbender.cmdline.argumentcollections.DbsnpArgumentCollection; import org.broadinstitute.hellbender.engine.*; import org.broadinstitute.hellbender.exceptions.UserException; +import org.broadinstitute.hellbender.tools.walkers.ReferenceConfidenceVariantContextMerger; import org.broadinstitute.hellbender.tools.walkers.annotator.*; +import org.broadinstitute.hellbender.tools.walkers.annotator.allelespecific.AS_StandardAnnotation; +import org.broadinstitute.hellbender.tools.walkers.annotator.allelespecific.ReducibleAnnotation; import org.broadinstitute.hellbender.tools.walkers.genotyper.*; import org.broadinstitute.hellbender.tools.walkers.genotyper.afcalc.FixedAFCalculatorProvider; import org.broadinstitute.hellbender.tools.walkers.haplotypecaller.HaplotypeCallerArgumentCollection; @@ -32,14 +35,14 @@ * Condense homRef blocks in a single-sample GVCF * *

- * ReblockGVCF compressed a GVCF by merging hom-ref blocks that were produced using the '-ERC GVCF' or '-ERC BP_RESOLUTION' mode of the + * ReblockGVCF compresses a GVCF by merging hom-ref blocks that were produced using the '-ERC GVCF' or '-ERC BP_RESOLUTION' mode of the * HaplotypeCaller according to new GQ band parameters. A joint callset produced with GVCFs reprocessed by ReblockGVCF will have * lower precision for hom-ref genotype qualities at variant sites, but the input data footprint can be greatly reduced * if the default GQ band parameters are used.

* *

Input

*

- * A HaplotypeCaller-produced gVCF to reblock + * A HaplotypeCaller-produced GVCF to reblock *

* *

Output

@@ -55,14 +58,24 @@ * -O sample1.reblocked.g.vcf * * + * Invocation as for use with GnarlyGenotyper in the "Biggest Practices" + *
+ *  gatk ReblockGVCF \
+ *    -R reference.fasta \
+ *    -V sample1.g.vcf \
+ *    -drop-low-quals \
+ *    -rgq-threshold 10 \
+ *    -do-qual-approx \
+ *    -O sample1.reblocked.g.vcf
+ *  * 
+ * *

Caveats

- *

Only single-sample gVCF files produced by HaplotypeCaller can be used as input for this tool.

- *

By default this tool only passes through annotations used by VQSR. A different set of annotations can be specified with the usual -A argument. + *

Only single-sample GVCF files produced by HaplotypeCaller can be used as input for this tool.

*

Special note on ploidy

*

This tool assumes diploid genotypes.

* */ -@ExperimentalFeature +@BetaFeature @CommandLineProgramProperties(summary = "Compress a single-sample GVCF from HaplotypeCaller by merging homRef blocks using new GQ band parameters", oneLineSummary = "Condenses homRef blocks in a single-sample GVCF", programGroup = OtherProgramGroup.class, @@ -96,7 +109,7 @@ public final class ReblockGVCF extends VariantWalker { protected double rgqThreshold = 0.0; @Advanced - @Argument(fullName="do-qual-score-approximation", shortName="do-qual-approx", doc="Add necessary INFO field annotation to perform QUAL approximation downstream") + @Argument(fullName="do-qual-score-approximation", shortName="do-qual-approx", doc="Add necessary INFO field annotation to perform QUAL approximation downstream; required for GnarlyGenotyper") protected boolean doQualApprox = false; /** @@ -113,7 +126,7 @@ public final class ReblockGVCF extends VariantWalker { private final List infoFieldAnnotationKeyNamesToRemove = Arrays.asList(GVCFWriter.GVCF_BLOCK, GATKVCFConstants.DOWNSAMPLED_KEY, GATKVCFConstants.HAPLOTYPE_SCORE_KEY, GATKVCFConstants.INBREEDING_COEFFICIENT_KEY, GATKVCFConstants.MLE_ALLELE_COUNT_KEY, - GATKVCFConstants.MLE_ALLELE_FREQUENCY_KEY); + GATKVCFConstants.MLE_ALLELE_FREQUENCY_KEY, GATKVCFConstants.EXCESS_HET_KEY); private VariantContextWriter vcfWriter; @@ -121,9 +134,8 @@ public final class ReblockGVCF extends VariantWalker { public boolean useVariantAnnotations() { return true;} @Override - public List getDefaultVariantAnnotations() { - return Arrays.asList(new Coverage(), new RMSMappingQuality(), new ReadPosRankSumTest(), new MappingQualityRankSumTest()); - + public List> getDefaultVariantAnnotationGroups() { + return Arrays.asList(StandardAnnotation.class, AS_StandardAnnotation.class); } @Override @@ -265,9 +277,10 @@ else if (!genotype.isCalled() && genotype.hasPL() && genotype.getPL()[0] == 0) { } } - private boolean shouldBeReblocked(final VariantContext result) { + @VisibleForTesting + protected boolean shouldBeReblocked(final VariantContext result) { final Genotype genotype = result.getGenotype(0); - return genotype.getPL()[0] < rgqThreshold || genotype.isHomRef(); + return !genotype.isCalled() || (genotype.hasPL() && genotype.getPL()[0] < rgqThreshold) || genotype.isHomRef(); } /** @@ -278,9 +291,12 @@ private boolean shouldBeReblocked(final VariantContext result) { */ @VisibleForTesting public VariantContext lowQualVariantToGQ0HomRef(final VariantContext result, final VariantContext originalVC) { - if(dropLowQuals && !isHomRefCall(result)) { + if(dropLowQuals && (!isHomRefCall(result) || !result.getGenotype(0).isCalled())) { return null; } + if (!result.getGenotype(0).isCalled()) { + return new VariantContextBuilder(result).attributes(null).make(); + } final Map attrMap = new HashMap<>(); final GenotypeBuilder gb = changeCallToGQ0HomRef(result, attrMap); @@ -337,17 +353,7 @@ protected GenotypeBuilder changeCallToGQ0HomRef(final VariantContext result, fin protected VariantContext cleanUpHighQualityVariant(final VariantContext result, final VariantContext originalVC) { Map attrMap = new HashMap<>(); Map origMap = originalVC.getAttributes(); - //copy over info annotations - for(final InfoFieldAnnotation annotation : annotationEngine.getInfoAnnotations()) { - for (final String key : annotation.getKeyNames()) { - if (infoFieldAnnotationKeyNamesToRemove.contains(key)) { - continue; - } - if (origMap.containsKey(key)) { - attrMap.put(key, origMap.get(key)); - } - } - } + final Genotype genotype = result.getGenotype(0); if (doQualApprox && genotype.hasPL()) { attrMap.put(GATKVCFConstants.RAW_QUAL_APPROX_KEY, genotype.getPL()[0]); @@ -407,18 +413,23 @@ protected VariantContext cleanUpHighQualityVariant(final VariantContext result, genotypesArray.add(g); } - //we're going to approximate depth for MQ calculation with the site-level DP (should be informative and uninformative reads), which is pretty safe because it will only differ if reads are missing MQ - final Double rawMqValue = originalVC.hasAttribute(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY) ? - originalVC.getAttributeAsDouble(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY, 0) : - originalVC.getAttributeAsDouble(VCFConstants.RMS_MAPPING_QUALITY_KEY, 60.0) * - originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY,0); - attrMap.put(GATKVCFConstants.RAW_MAPPING_QUALITY_WITH_DEPTH_KEY, - String.format("%.2f,%d", rawMqValue, originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY,0))); - attrMap.put(GATKVCFConstants.MAPPING_QUALITY_DEPTH, originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY,0)); //NOTE: this annotation is deprecated, but keep it here so we don't have to reprocess gnomAD v3 GVCFs again - if (originalVC.hasAttribute(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY)) { - attrMap.put(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY, originalVC.getAttributeAsDouble(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY, 0)); //NOTE: this annotation is deprecated, but keep it here so we don't have to reprocess gnomAD v3 GVCFs again + if (!originalVC.hasAttribute(GATKVCFConstants.RAW_MAPPING_QUALITY_WITH_DEPTH_KEY)) { + //we're going to approximate depth for MQ calculation with the site-level DP (should be informative and uninformative reads), which is pretty safe because it will only differ if reads are missing MQ + final Integer rawMqValue = originalVC.hasAttribute(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY) ? + (int)Math.round(originalVC.getAttributeAsDouble(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY, 0.0)) : + (int)Math.round(originalVC.getAttributeAsDouble(VCFConstants.RMS_MAPPING_QUALITY_KEY, 60.0) * + originalVC.getAttributeAsDouble(VCFConstants.RMS_MAPPING_QUALITY_KEY, 60.0) * + originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0)); + attrMap.put(GATKVCFConstants.RAW_MAPPING_QUALITY_WITH_DEPTH_KEY, + String.format("%d,%d", rawMqValue, originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0))); + attrMap.put(GATKVCFConstants.MAPPING_QUALITY_DEPTH, originalVC.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0)); //NOTE: this annotation is deprecated, but keep it here so we don't have to reprocess gnomAD v3 GVCFs again + if (originalVC.hasAttribute(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY)) { + attrMap.put(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY, originalVC.getAttributeAsDouble(GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY, 0)); //NOTE: this annotation is deprecated, but keep it here so we don't have to reprocess gnomAD v3 GVCFs again + } } + + int[] relevantIndices = new int[result.getNAlleles()]; if(allelesNeedSubsetting) { List newAlleleSet = new ArrayList<>(); for(final Allele a : result.getAlleles()) { @@ -429,9 +440,41 @@ protected VariantContext cleanUpHighQualityVariant(final VariantContext result, if(!genotypesWereModified) { builder.genotypes(AlleleSubsettingUtils.subsetAlleles(result.getGenotypes(), PLOIDY_TWO, result.getAlleles(), newAlleleSet, GenotypeAssignmentMethod.USE_PLS_TO_ASSIGN, result.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0))); } - else { //again, only initialize a builder if we have to + else { builder.genotypes(AlleleSubsettingUtils.subsetAlleles(newGenotypes, PLOIDY_TWO, result.getAlleles(), newAlleleSet, GenotypeAssignmentMethod.USE_PLS_TO_ASSIGN, result.getAttributeAsInt(VCFConstants.DEPTH_KEY, 0))); } + relevantIndices = newAlleleSet.stream().mapToInt(a -> result.getAlleles().indexOf(a)).toArray(); + } + + //copy over info annotations + for(final InfoFieldAnnotation annotation : annotationEngine.getInfoAnnotations()) { + for (final String key : annotation.getKeyNames()) { + if (infoFieldAnnotationKeyNamesToRemove.contains(key)) { + continue; + } + if (origMap.containsKey(key)) { + attrMap.put(key, origMap.get(key)); + } + } + if (annotation instanceof ReducibleAnnotation) { + final String key = ((ReducibleAnnotation)annotation).getRawKeyName(); + if (infoFieldAnnotationKeyNamesToRemove.contains(key)) { + continue; + } + if (origMap.containsKey(key)) { + if (allelesNeedSubsetting && AnnotationUtils.isAlleleSpecific(annotation)) { + List alleleSpecificValues = AnnotationUtils.getAlleleLengthListOfString(originalVC.getAttributeAsString(key, null)); + final List subsetList = alleleSpecificValues.size() > 0 ? ReferenceConfidenceVariantContextMerger.remapRLengthList(alleleSpecificValues, relevantIndices) + : Collections.nCopies(relevantIndices.length, ""); + attrMap.put(key, AnnotationUtils.encodeAnyASList(subsetList)); + } + else { + attrMap.put(key, origMap.get(key)); + } + } + } + } + if (allelesNeedSubsetting) { //only trim if we're subsetting alleles, and we only subset if we're allowed to drop sites, as per the -drop-low-quals arg return GATKVariantContextUtils.reverseTrimAlleles(builder.attributes(attrMap).unfiltered().make()); } diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_BaseQualityRankSumTestUnitTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_BaseQualityRankSumTestUnitTest.java index 309e5273868..c07f251e9b2 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_BaseQualityRankSumTestUnitTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/annotator/allelespecific/AS_BaseQualityRankSumTestUnitTest.java @@ -4,6 +4,7 @@ import org.broadinstitute.hellbender.engine.ReferenceContext; import org.broadinstitute.hellbender.tools.walkers.annotator.Annotation; import org.broadinstitute.hellbender.testutils.ArtificialAnnotationUtils; +import org.broadinstitute.hellbender.tools.walkers.annotator.AnnotationUtils; import org.broadinstitute.hellbender.tools.walkers.annotator.BaseQualityRankSumTestUnitTest; import org.broadinstitute.hellbender.utils.MannWhitneyU; import org.broadinstitute.hellbender.utils.genotyper.ReadLikelihoods; @@ -86,7 +87,7 @@ public void testBaseQualRawAnnotate() { String secondExpected = String.format("%.1f",Math.round(Math.floor((expectedAlt2.getZ() )/0.1))*0.1); // Note, when we output the raw annotated RankSum score, we output the MannWhitneyU test Z value as a histogram for each alt allele - final String expectedAnnotation = AS_RankSumTest.PRINT_DELIM + firstExpected + ",1" + AS_RankSumTest.PRINT_DELIM + secondExpected + ",1"; + final String expectedAnnotation = AnnotationUtils.ALLELE_SPECIFIC_PRINT_DELIM + firstExpected + ",1" + AnnotationUtils.ALLELE_SPECIFIC_PRINT_DELIM + secondExpected + ",1"; final MannWhitneyU.Result annotateResult = mannWhitneyU.test(Stream.concat(Arrays.stream(alt1BaseQuals).boxed(), Arrays.stream(alt2BaseQuals).boxed()).mapToDouble(i->(double)i).toArray(), Arrays.stream(refBaseQuals).asDoubleStream().toArray(), MannWhitneyU.TestType.FIRST_DOMINATES); final double annotateZScore = annotateResult.getZ(); diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java index 2465790ef1e..10cc561dd42 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFIntegrationTest.java @@ -40,6 +40,11 @@ public void testGVCFReblockingIsContiguous() throws Exception { .addArgument("V", largeFileTestDir + "NA12878.prod.chr20snippet.g.vcf.gz") .addArgument("rgq-threshold", "20") .addArgument("L", "20:60001-1000000") + .addArgument("A", "Coverage") + .addArgument("A", "RMSMappingQuality") + .addArgument("A", "ReadPosRankSumTest") + .addArgument("A", "MappingQualityRankSumTest") + .addBooleanArgument("disable-tool-default-annotations", true) .addOutput(output); runCommandLine(args); @@ -59,12 +64,13 @@ public void testGVCFReblockingIsContiguous() throws Exception { } } - @Test + @Test //absolute minimal output public void testOneSampleAsForGnomAD() throws Exception { final IntegrationTestSpec spec = new IntegrationTestSpec( "-drop-low-quals -do-qual-approx -L chr20:69485-69791 -O %s -R " + hg38_reference_20_21 + " -V " + getToolTestDataDir() + "gvcfForReblocking.g.vcf" + - " --" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE + " false", + " --" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE + " false" + + " -A Coverage -A RMSMappingQuality -A ReadPosRankSumTest -A MappingQualityRankSumTest --disable-tool-default-annotations true", Arrays.asList(getToolTestDataDir() + "testOneSampleAsForGnomAD.expected.g.vcf")); spec.executeTest("testOneSampleDropLows", this); } @@ -86,6 +92,25 @@ public void testRawMQInput() throws Exception { " -V " + getToolTestDataDir() + "prod.chr20snippet.withRawMQ.g.vcf" + " --" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE + " false", Arrays.asList(getToolTestDataDir() + "prod.chr20snippet.withRawMQ.expected.g.vcf")); - spec.executeTest("testNonRefADCorrection", this); + spec.executeTest("testRawMQInput", this); + } + + @Test + public void testASAnnotationsAndSubsetting() throws Exception { + //some subsetting, but never dropping the first alt + final IntegrationTestSpec spec = new IntegrationTestSpec( + "-O %s -R " + b37_reference_20_21 + + " -drop-low-quals -do-qual-approx -V " + "src/test/resources/org/broadinstitute/hellbender/tools/walkers/CombineGVCFs/NA12878.AS.chr20snippet.g.vcf" + + " --" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE + " false", + Arrays.asList(getToolTestDataDir() + "expected.NA12878.AS.chr20snippet.reblocked.g.vcf")); + spec.executeTest("testASAnnotationsAndSubsetting", this); + + //one case where first alt is dropped + final IntegrationTestSpec spec2 = new IntegrationTestSpec( + "-O %s -R " + b37_reference_20_21 + + " -drop-low-quals -do-qual-approx -V " + "src/test/resources/org/broadinstitute/hellbender/tools/walkers/CombineGVCFs/NA12892.AS.chr20snippet.g.vcf" + + " --" + StandardArgumentDefinitions.ADD_OUTPUT_VCF_COMMANDLINE + " false", + Arrays.asList(getToolTestDataDir() + "expected.NA12892.AS.chr20snippet.reblocked.g.vcf")); + spec2.executeTest("testASAnnotationsAndSubsetting2", this); } } \ No newline at end of file diff --git a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFUnitTest.java b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFUnitTest.java index e652e167f02..825a8dff712 100644 --- a/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFUnitTest.java +++ b/src/test/java/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCFUnitTest.java @@ -71,6 +71,12 @@ public void testLowQualVariantToGQ0HomRef() { Assert.assertTrue(modified.getAlternateAllele(0).equals(Allele.NON_REF_ALLELE)); Assert.assertTrue(!modified.filtersWereApplied()); Assert.assertTrue(modified.getLog10PError() == VariantContext.NO_LOG10_PERROR); + + //No-calls were throwing NPEs. Now they're not. + final Genotype g2 = makeG("sample1", Allele.NO_CALL,Allele.NO_CALL); + final VariantContext noData = makeDeletionVC("noData", Arrays.asList(LONG_REF, DELETION, Allele.NON_REF_ALLELE), LONG_REF.length(), g2); + final VariantContext notCrashing = reblocker.lowQualVariantToGQ0HomRef(noData, noData); + Assert.assertTrue(notCrashing.getGenotype(0).isNoCall()); } @Test @@ -89,6 +95,15 @@ public void testChangeCallToGQ0HomRef() { Assert.assertTrue(!newG.hasAD()); } + @Test //no-calls can be dropped or reblocked just like hom-refs, i.e. we don't have to preserve them like variants + public void testNoCalls() { + final ReblockGVCF reblocker = new ReblockGVCF(); + + final Genotype g2 = makeG("sample1", Allele.NO_CALL,Allele.NO_CALL); + final VariantContext noData = makeDeletionVC("noData", Arrays.asList(LONG_REF, DELETION, Allele.NON_REF_ALLELE), LONG_REF.length(), g2); + Assert.assertTrue(reblocker.shouldBeReblocked(noData)); + } + //TODO: these are duplicated from PosteriorProbabilitiesUtilsUnitTest but PR #4947 modifies VariantContextTestUtils, so I'll do some refactoring before the second of the two is merged private Genotype makeG(final String sample, final Allele a1, final Allele a2, final int... pls) { return new GenotypeBuilder(sample, Arrays.asList(a1, a2)).PL(pls).make(); diff --git a/src/test/resources/large/testProductionGVCF.expected.g.vcf b/src/test/resources/large/testProductionGVCF.expected.g.vcf index df83f390f00..dbfc1d35245 100644 --- a/src/test/resources/large/testProductionGVCF.expected.g.vcf +++ b/src/test/resources/large/testProductionGVCF.expected.g.vcf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c796be4abad8123526a12858c43a0f0f16f9bd792e02ec10429a2ff7c98b7bb -size 1383851 +oid sha256:d6033253e252ce4ec497f62b78501173243187d0ce16ef1f099a26d44be4791f +size 1381642 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12878.AS.chr20snippet.reblocked.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12878.AS.chr20snippet.reblocked.g.vcf new file mode 100644 index 00000000000..7d372d19a42 --- /dev/null +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12878.AS.chr20snippet.reblocked.g.vcf @@ -0,0 +1,198 @@ +##fileformat=VCFv4.2 +##ALT= +##FILTER= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##GATKCommandLine.HaplotypeCaller= +##GVCFBlock0-20=minGQ=0(inclusive),maxGQ=20(exclusive) +##GVCFBlock20-100=minGQ=20(inclusive),maxGQ=100(exclusive) +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##reference=file:///seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA12878 +20 10087820 . C CAG, 294.64 . AS_RAW_BaseQRankSum=|-2.1,1|NaN;AS_RAW_MQ=123769.00|46800.00|0.00;AS_RAW_MQRankSum=|0.6,1|NaN;AS_RAW_ReadPosRankSum=|-0.4,1|NaN;AS_SB_TABLE=17,18|8,5|0,0;BaseQRankSum=-2.273;DP=93;MQRankSum=0.678;MQ_DP=93;QUALapprox=302;RAW_MQ=329810.00;RAW_MQandDP=329810,93;ReadPosRankSum=-0.492;VarDP=49 GT:AD:GQ:PL:SB 0/1:35,13,0:99:302,0,1079,483,1169,1922:17,18,9,5 +20 10433000 . G . . END=10433307 GT:DP:GQ:MIN_DP:PL 0/0:36:21:29:0,21,315 +20 10433308 . G . . END=10433311 GT:DP:GQ:MIN_DP:PL 0/0:27:6:27:0,6,90 +20 10433312 . C . . END=10433319 GT:DP:GQ:MIN_DP:PL 0/0:16:75:16:0,75,839 +20 10433321 . A . . END=10433321 GT:DP:GQ:MIN_DP:PL 0/0:29:33:29:0,33,495 +20 10433322 . A AT, 116.64 . AS_RAW_BaseQRankSum=|2.5,1|NaN;AS_RAW_MQ=14418.00|9723.00|0.00;AS_RAW_MQRankSum=|1.1,1|NaN;AS_RAW_ReadPosRankSum=|2.0,1|NaN;AS_SB_TABLE=5,6|2,3|0,0;BaseQRankSum=2.564;DP=35;MQRankSum=1.122;MQ_DP=35;QUALapprox=124;RAW_MQ=67710.00;RAW_MQandDP=67710,35;ReadPosRankSum=2.044;VarDP=16 GT:AD:GQ:PL:SB 0/1:11,5,0:99:124,0,369,158,384,542:5,6,2,3 +20 10433324 . A T, 220.60 . AS_RAW_BaseQRankSum=|2.2,1|NaN;AS_RAW_MQ=11895.00|10564.00|0.00;AS_RAW_MQRankSum=|0.5,1|NaN;AS_RAW_ReadPosRankSum=|1.5,1|NaN;AS_SB_TABLE=2,6|2,4|0,0;BaseQRankSum=2.279;DP=33;MQRankSum=0.584;MQ_DP=33;QUALapprox=228;RAW_MQ=60510.00;RAW_MQandDP=60510,33;ReadPosRankSum=1.543;VarDP=14 GT:AD:GQ:PGT:PID:PL:SB 0/1:8,6,0:99:0|1:10433324_A_T:228,0,275,252,294,546:2,6,2,4 +20 10433326 . A T, 220.60 . AS_RAW_BaseQRankSum=|0.8,1|NaN;AS_RAW_MQ=11895.00|10564.00|0.00;AS_RAW_MQRankSum=|0.5,1|NaN;AS_RAW_ReadPosRankSum=|1.4,1|NaN;AS_SB_TABLE=2,6|2,4|0,0;BaseQRankSum=0.874;DP=31;MQRankSum=0.584;MQ_DP=31;QUALapprox=228;RAW_MQ=53310.00;RAW_MQandDP=53310,31;ReadPosRankSum=1.403;VarDP=14 GT:AD:GQ:PGT:PID:PL:SB 0/1:8,6,0:99:0|1:10433324_A_T:228,0,275,252,293,546:2,6,2,4 +20 10433328 . A T,ATATAT, 902.06 . AS_RAW_BaseQRankSum=|||;AS_RAW_MQ=0.00|10564.00|2523.00|0.00;AS_RAW_MQRankSum=|||;AS_RAW_ReadPosRankSum=|||;AS_SB_TABLE=0,0|2,4|1,2|0,0;DP=30;MQ_DP=30;QUALapprox=919;RAW_MQ=49710.00;RAW_MQandDP=49710,30;VarDP=9 GT:AD:GQ:PL:SB 1/2:0,6,3,0:99:919,177,246,420,0,500,676,211,530,804:0,0,3,6 +20 10433330 . T . . END=10433330 GT:DP:GQ:MIN_DP:PL 0/0:27:12:27:0,12,900 +20 10433331 . A . . END=10433344 GT:DP:GQ:MIN_DP:PL 0/0:27:47:25:0,47,810 +20 10433346 . T . . END=10433347 GT:DP:GQ:MIN_DP:PL 0/0:32:72:32:0,72,1080 +20 10433349 . A . . END=10433381 GT:DP:GQ:MIN_DP:PL 0/0:27:45:26:0,45,915 +20 10433382 . T C, 624.60 . AS_RAW_BaseQRankSum=|-1.9,1|NaN;AS_RAW_MQ=40862.00|45723.00|0.00;AS_RAW_MQRankSum=|1.0,1|NaN;AS_RAW_ReadPosRankSum=|0.2,1|NaN;AS_SB_TABLE=10,5|11,4|0,0;BaseQRankSum=-1.821;DP=30;MQRankSum=1.033;MQ_DP=30;QUALapprox=632;RAW_MQ=86585.00;RAW_MQandDP=86585,30;ReadPosRankSum=0.249;VarDP=30 GT:AD:GQ:PGT:PID:PL:SB 0/1:15,15,0:99:0|1:10433382_T_C:632,0,601,680,652,1332:10,5,11,4 +20 10433383 . G . . END=10433390 GT:DP:GQ:MIN_DP:PL 0/0:32:84:31:0,84,1260 +20 10433391 . T C, 623.60 . AS_RAW_BaseQRankSum=|-0.3,1|NaN;AS_RAW_MQ=51662.00|52082.00|0.00;AS_RAW_MQRankSum=|1.3,1|NaN;AS_RAW_ReadPosRankSum=|1.5,1|NaN;AS_SB_TABLE=14,4|13,3|0,0;BaseQRankSum=-0.284;DP=34;MQRankSum=1.329;MQ_DP=34;QUALapprox=631;RAW_MQ=103744.00;RAW_MQandDP=103744,34;ReadPosRankSum=1.536;VarDP=34 GT:AD:GQ:PGT:PID:PL:SB 0/1:18,16,0:99:0|1:10433382_T_C:631,0,673,685,724,1409:14,4,13,3 +20 10433392 . A . . END=10433467 GT:DP:GQ:MIN_DP:PL 0/0:37:84:33:0,84,1110 +20 10433468 . T C, 645.60 . AS_RAW_BaseQRankSum=|-1.4,1|NaN;AS_RAW_MQ=63049.00|69241.00|0.00;AS_RAW_MQRankSum=|0.0,1|NaN;AS_RAW_ReadPosRankSum=|1.4,1|NaN;AS_SB_TABLE=13,5|12,8|0,0;BaseQRankSum=-1.312;DP=38;MQRankSum=0.076;MQ_DP=38;QUALapprox=653;RAW_MQ=132290.00;RAW_MQandDP=132290,38;ReadPosRankSum=1.463;VarDP=38 GT:AD:GQ:PL:SB 0/1:18,20,0:99:653,0,572,707,633,1339:13,5,12,8 +20 10433469 . A . . END=10433559 GT:DP:GQ:MIN_DP:PL 0/0:47:99:47:0,99,1410 +20 10433560 . C A, 987.60 . AS_RAW_BaseQRankSum=|3.4,1|NaN;AS_RAW_MQ=111600.00|87769.00|0.00;AS_RAW_MQRankSum=|-1.1,1|NaN;AS_RAW_ReadPosRankSum=|1.3,1|NaN;AS_SB_TABLE=30,1|22,3|0,0;BaseQRankSum=3.497;DP=56;MQRankSum=-1.078;MQ_DP=56;QUALapprox=995;RAW_MQ=199369.00;RAW_MQandDP=199369,56;ReadPosRankSum=1.376;VarDP=56 GT:AD:GQ:PGT:PID:PL:SB 0/1:31,25,0:99:0|1:10433560_C_A:995,0,3032,1092,3110,4202:30,1,22,3 +20 10433561 . G . . END=10433574 GT:DP:GQ:MIN_DP:PL 0/0:61:99:61:0,120,1800 +20 10433575 . C T, 1143.60 . AS_RAW_BaseQRankSum=|3.8,1|NaN;AS_RAW_MQ=119641.00|100251.00|0.00;AS_RAW_MQRankSum=|-1.2,1|NaN;AS_RAW_ReadPosRankSum=|0.8,1|NaN;AS_SB_TABLE=31,3|26,4|0,0;BaseQRankSum=3.811;DP=64;MQRankSum=-1.123;MQ_DP=64;QUALapprox=1151;RAW_MQ=219892.00;RAW_MQandDP=219892,64;ReadPosRankSum=0.830;VarDP=64 GT:AD:GQ:PGT:PID:PL:SB 0/1:34,30,0:99:0|1:10433560_C_A:1151,0,3385,1260,3476,4735:31,3,26,4 +20 10433576 . G . . END=10433593 GT:DP:GQ:MIN_DP:PL 0/0:60:99:60:0,120,1800 +20 10433594 . C T, 1105.60 . AS_RAW_BaseQRankSum=|4.8,1|NaN;AS_RAW_MQ=108841.00|85615.00|0.00;AS_RAW_MQRankSum=|-2.4,1|NaN;AS_RAW_ReadPosRankSum=|-0.6,1|NaN;AS_SB_TABLE=28,3|25,4|0,0;BaseQRankSum=4.816;DP=61;MQRankSum=-2.334;MQ_DP=61;QUALapprox=1113;RAW_MQ=195825.00;RAW_MQandDP=195825,61;ReadPosRankSum=-0.502;VarDP=60 GT:AD:GQ:PGT:PID:PL:SB 0/1:31,29,0:99:0|1:10433560_C_A:1113,0,3070,1206,3160,4366:28,3,25,4 +20 10433595 . T . . END=10433808 GT:DP:GQ:MIN_DP:PL 0/0:44:93:39:0,93,1395 +20 10433809 . A G, 1135.60 . AS_RAW_BaseQRankSum=|1.4,1|NaN;AS_RAW_MQ=115200.00|122400.00|0.00;AS_RAW_MQRankSum=|0.0,1|NaN;AS_RAW_ReadPosRankSum=|-0.5,1|NaN;AS_SB_TABLE=13,19|12,22|0,0;BaseQRankSum=1.405;DP=68;MQRankSum=0.000;MQ_DP=68;QUALapprox=1143;RAW_MQ=242569.00;RAW_MQandDP=242569,68;ReadPosRankSum=-0.445;VarDP=66 GT:AD:GQ:PL:SB 0/1:32,34,0:99:1143,0,1041,1240,1143,2383:13,19,12,22 +20 10433810 . C . . END=10433954 GT:DP:GQ:MIN_DP:PL 0/0:52:59:51:0,59,1305 +20 10433955 . C CGTGTGTGTGTAT, 1027.64 . AS_RAW_BaseQRankSum=|0.4,1|NaN;AS_RAW_MQ=59810.00|39497.00|0.00;AS_RAW_MQRankSum=|-4.0,1|NaN;AS_RAW_ReadPosRankSum=|-0.8,1|NaN;AS_SB_TABLE=12,6|16,8|0,0;BaseQRankSum=0.422;DP=47;MQRankSum=-4.001;MQ_DP=47;QUALapprox=1035;RAW_MQ=117307.00;RAW_MQandDP=117307,47;ReadPosRankSum=-0.789;VarDP=42 GT:AD:GQ:PL:SB 0/1:18,24,0:99:1035,0,1217,1090,1298,2389:12,6,16,8 +20 10433957 . T . . END=10433965 GT:DP:GQ:MIN_DP:PL 0/0:51:60:51:0,60,900 +20 10433967 . T . . END=10433981 GT:DP:GQ:MIN_DP:PL 0/0:45:60:42:0,60,900 +20 10433985 . T . . END=10433985 GT:DP:GQ:MIN_DP:PL 0/0:38:75:38:0,75,1125 +20 10433987 . T . . END=10433987 GT:DP:GQ:MIN_DP:PL 0/0:37:78:37:0,78,1170 +20 10433991 . T . . END=10433992 GT:DP:GQ:MIN_DP:PL 0/0:36:72:36:0,72,1080 +20 10433994 . A . . END=10433994 GT:DP:GQ:MIN_DP:PL 0/0:32:75:32:0,75,1125 +20 10433995 . C . . END=10433995 GT:DP:GQ:MIN_DP:PL 0/0:31:18:31:0,18,855 +20 10433996 . G . . END=10434176 GT:DP:GQ:MIN_DP:PL 0/0:32:49:29:0,49,863 +20 10434177 . A T, 1467.60 . AS_RAW_BaseQRankSum=|0.9,1|NaN;AS_RAW_MQ=108000.00|133784.00|0.00;AS_RAW_MQRankSum=|-2.5,1|NaN;AS_RAW_ReadPosRankSum=|-0.9,1|NaN;AS_SB_TABLE=15,15|23,20|0,0;BaseQRankSum=0.903;DP=74;MQRankSum=-2.473;MQ_DP=74;QUALapprox=1475;RAW_MQ=245384.00;RAW_MQandDP=245384,74;ReadPosRankSum=-0.891;VarDP=73 GT:AD:GQ:PL:SB 0/1:30,43,0:99:1475,0,936,1565,1066,2631:15,15,23,20 +20 10434178 . G . . END=10434257 GT:DP:GQ:MIN_DP:PL 0/0:75:99:75:0,120,1800 +20 10434258 . G A, 1235.60 . AS_RAW_BaseQRankSum=|3.0,1|NaN;AS_RAW_MQ=109369.00|106451.00|0.00;AS_RAW_MQRankSum=|-2.9,1|NaN;AS_RAW_ReadPosRankSum=|-0.2,1|NaN;AS_SB_TABLE=19,12|24,14|0,0;BaseQRankSum=3.063;DP=70;MQRankSum=-2.871;MQ_DP=70;QUALapprox=1243;RAW_MQ=219420.00;RAW_MQandDP=219420,70;ReadPosRankSum=-0.155;VarDP=69 GT:AD:GQ:PL:SB 0/1:31,38,0:99:1243,0,1003,1337,1118,2455:19,12,24,14 +20 10434259 . T . . END=10434383 GT:DP:GQ:MIN_DP:PL 0/0:66:99:66:0,108,1620 +20 10434384 . TA T, 782.60 . AS_RAW_BaseQRankSum=|-0.1,1|NaN;AS_RAW_MQ=123769.00|118800.00|0.00;AS_RAW_MQRankSum=|1.0,1|NaN;AS_RAW_ReadPosRankSum=|0.4,1|NaN;AS_SB_TABLE=22,13|21,12|0,0;BaseQRankSum=-0.100;DP=71;MQRankSum=1.000;MQ_DP=71;QUALapprox=790;RAW_MQ=253369.00;RAW_MQandDP=253369,71;ReadPosRankSum=0.497;VarDP=68 GT:AD:GQ:PL:SB 0/1:35,33,0:99:790,0,846,895,945,1840:22,13,21,12 +20 10434387 . A . . END=10434518 GT:DP:GQ:MIN_DP:PL 0/0:75:36:75:0,36,1800 +20 10434519 . T C, 1464.60 . AS_RAW_BaseQRankSum=|-3.2,1|NaN;AS_RAW_MQ=126000.00|154800.00|0.00;AS_RAW_MQRankSum=|0.0,1|NaN;AS_RAW_ReadPosRankSum=|-0.8,1|NaN;AS_SB_TABLE=18,17|19,24|0,0;BaseQRankSum=-3.137;DP=78;MQRankSum=0.000;MQ_DP=78;QUALapprox=1472;RAW_MQ=280800.00;RAW_MQandDP=280800,78;ReadPosRankSum=-0.749;VarDP=78 GT:AD:GQ:PL:SB 0/1:35,43,0:99:1472,0,1192,1577,1321,2898:18,17,19,24 +20 10434520 . T . . END=10435066 GT:DP:GQ:MIN_DP:PL 0/0:69:72:67:0,72,1080 +20 10435067 . GTA G, 1446.60 . AS_RAW_BaseQRankSum=|2.6,1|NaN;AS_RAW_MQ=108000.00|133200.00|0.00;AS_RAW_MQRankSum=|0.0,1|NaN;AS_RAW_ReadPosRankSum=|-0.2,1|NaN;AS_SB_TABLE=15,15|22,15|0,0;BaseQRankSum=2.601;DP=67;MQRankSum=0.000;MQ_DP=67;QUALapprox=1454;RAW_MQ=241200.00;RAW_MQandDP=241200,67;ReadPosRankSum=-0.183;VarDP=67 GT:AD:GQ:PL:SB 0/1:30,37,0:99:1454,0,1191,1544,1303,2847:15,15,22,15 +20 10435071 . T . . END=10435947 GT:DP:GQ:MIN_DP:PL 0/0:74:91:66:0,91,1800 +20 10435948 . A C, 1137.60 . AS_RAW_BaseQRankSum=|-4.7,1|NaN;AS_RAW_MQ=144000.00|107528.00|0.00;AS_RAW_MQRankSum=|-3.2,1|NaN;AS_RAW_ReadPosRankSum=|-1.6,1|NaN;AS_SB_TABLE=19,21|20,16|0,0;BaseQRankSum=-4.692;DP=76;MQRankSum=-3.121;MQ_DP=76;QUALapprox=1145;RAW_MQ=251528.00;RAW_MQandDP=251528,76;ReadPosRankSum=-1.594;VarDP=76 GT:AD:GQ:PL:SB 0/1:40,36,0:99:1145,0,1413,1266,1521,2787:19,21,20,16 +20 10435949 . A . . END=10436226 GT:DP:GQ:MIN_DP:PL 0/0:68:99:68:0,120,1800 +20 10436227 . TTTTATTTATTTATTTATTTA T,TTTTATTTATTTATTTATTTATTTA, 1208.06 . AS_RAW_BaseQRankSum=|||;AS_RAW_MQ=3600.00|25702.00|19682.00|0.00;AS_RAW_MQRankSum=|||;AS_RAW_ReadPosRankSum=|||;AS_SB_TABLE=1,0|14,10|4,3|0,0;BaseQRankSum=-1.450;DP=75;MQRankSum=-1.660;MQ_DP=75;QUALapprox=1225;RAW_MQ=201025.00;RAW_MQandDP=201025,75;ReadPosRankSum=1.303;VarDP=32 GT:AD:GQ:PL:SB 1/2:1,24,7,0:99:1225,241,589,947,0,970,1258,491,1017,1480:1,0,18,13 +20 10436249 . T . . END=10436254 GT:DP:GQ:MIN_DP:PL 0/0:44:78:43:0,78,1170 +20 10436259 . A . . END=10436259 GT:DP:GQ:MIN_DP:PL 0/0:42:90:42:0,90,1350 +20 10436261 . T . . END=10436262 GT:DP:GQ:MIN_DP:PL 0/0:41:6:41:0,6,1320 +20 10436263 . A . . END=10436414 GT:DP:GQ:MIN_DP:PL 0/0:39:68:38:0,68,1335 +20 10436415 . A G, 1190.60 . AS_RAW_BaseQRankSum=|-2.8,1|NaN;AS_RAW_MQ=81904.00|141241.00|0.00;AS_RAW_MQRankSum=|0.4,1|NaN;AS_RAW_ReadPosRankSum=|-0.1,1|NaN;AS_SB_TABLE=15,8|17,23|0,0;BaseQRankSum=-2.775;DP=63;MQRankSum=0.399;MQ_DP=63;QUALapprox=1198;RAW_MQ=223145.00;RAW_MQandDP=223145,63;ReadPosRankSum=-0.063;VarDP=63 GT:AD:GQ:PL:SB 0/1:23,40,0:99:1198,0,691,1267,810,2077:15,8,17,23 +20 10436416 . C . . END=10436581 GT:DP:GQ:MIN_DP:PL 0/0:65:99:65:0,120,1800 +20 10436582 . A G, 1187.60 . AS_RAW_BaseQRankSum=|-1.4,1|NaN;AS_RAW_MQ=117410.00|103379.00|0.00;AS_RAW_MQRankSum=|-2.7,1|NaN;AS_RAW_ReadPosRankSum=|0.2,1|NaN;AS_SB_TABLE=16,18|21,16|0,0;BaseQRankSum=-1.326;DP=71;MQRankSum=-2.639;MQ_DP=71;QUALapprox=1195;RAW_MQ=220789.00;RAW_MQandDP=220789,71;ReadPosRankSum=0.267;VarDP=71 GT:AD:GQ:PL:SB 0/1:34,37,0:99:1195,0,1113,1298,1225,2522:16,18,21,16 +20 10436583 . T . . END=10436699 GT:DP:GQ:MIN_DP:PL 0/0:87:99:87:0,120,1800 +20 10436700 . A G, 1333.60 . AS_RAW_BaseQRankSum=|-1.4,1|NaN;AS_RAW_MQ=108000.00|141769.00|0.00;AS_RAW_MQRankSum=|-0.9,1|NaN;AS_RAW_ReadPosRankSum=|0.5,1|NaN;AS_SB_TABLE=18,12|21,19|0,0;BaseQRankSum=-1.329;DP=70;MQRankSum=-0.837;MQ_DP=70;QUALapprox=1341;RAW_MQ=249769.00;RAW_MQandDP=249769,70;ReadPosRankSum=0.581;VarDP=70 GT:AD:GQ:PL:SB 0/1:30,40,0:99:1341,0,961,1431,1081,2513:18,12,21,19 +20 10436701 . T . . END=10436907 GT:DP:GQ:MIN_DP:PL 0/0:74:99:74:0,120,1800 +20 10436908 . C G, 1361.60 . AS_RAW_BaseQRankSum=|-0.9,1|NaN;AS_RAW_MQ=145849.00|145638.00|0.00;AS_RAW_MQRankSum=|-1.0,1|NaN;AS_RAW_ReadPosRankSum=|-0.2,1|NaN;AS_SB_TABLE=15,26|11,31|0,0;BaseQRankSum=-0.844;DP=83;MQRankSum=-0.994;MQ_DP=83;QUALapprox=1369;RAW_MQ=291487.00;RAW_MQandDP=291487,83;ReadPosRankSum=-0.148;VarDP=83 GT:AD:GQ:PL:SB 0/1:41,42,0:99:1369,0,1378,1492,1504,2996:15,26,11,31 +20 10436909 . A . . END=10437000 GT:DP:GQ:MIN_DP:PL 0/0:79:99:79:0,120,1800 +20 10684106 . C . . END=10684118 GT:DP:GQ:MIN_DP:PL 0/0:29:99:29:0,112,2450 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12892.AS.chr20snippet.reblocked.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12892.AS.chr20snippet.reblocked.g.vcf new file mode 100644 index 00000000000..3f916af84d5 --- /dev/null +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/expected.NA12892.AS.chr20snippet.reblocked.g.vcf @@ -0,0 +1,154 @@ +##fileformat=VCFv4.2 +##ALT= +##FILTER= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##GATKCommandLine.HaplotypeCaller= +##GVCFBlock0-20=minGQ=0(inclusive),maxGQ=20(exclusive) +##GVCFBlock20-100=minGQ=20(inclusive),maxGQ=100(exclusive) +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##reference=file:///seq/references/Homo_sapiens_assembly19/v1/Homo_sapiens_assembly19.fasta +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA12892 +20 10087820 . C CAGAGAG, 598.64 . AS_RAW_BaseQRankSum=|1.0,1|NaN;AS_RAW_MQ=97208.00|47258.00|0.00;AS_RAW_MQRankSum=|-3.1,1|NaN;AS_RAW_ReadPosRankSum=|-0.3,1|NaN;AS_SB_TABLE=16,13|12,12|0,0;BaseQRankSum=0.955;DP=74;MQRankSum=-3.130;MQ_DP=74;QUALapprox=606;RAW_MQ=211789.00;RAW_MQandDP=211789,74;ReadPosRankSum=-0.254;VarDP=55 GT:AD:GQ:PL:SB 0/1:29,24,0:99:606,0,849,697,927,1653:16,13,12,14 +20 10433000 . G . . END=10433308 GT:DP:GQ:MIN_DP:PL 0/0:37:21:29:0,21,315 +20 10433309 . T . . END=10433319 GT:DP:GQ:MIN_DP:PL 0/0:30:6:25:0,6,90 +20 10433321 . A . . END=10433321 GT:DP:GQ:MIN_DP:PL 0/0:35:21:35:0,21,315 +20 10433322 . A AT, 442.64 . AS_RAW_BaseQRankSum=|0.8,1|NaN;AS_RAW_MQ=3364.00|31589.00|0.00;AS_RAW_MQRankSum=|2.2,1|NaN;AS_RAW_ReadPosRankSum=|1.9,1|NaN;AS_SB_TABLE=2,2|6,6|0,0;BaseQRankSum=0.877;DP=42;MQRankSum=1.895;MQ_DP=42;QUALapprox=450;RAW_MQ=86818.00;RAW_MQandDP=86818,42;ReadPosRankSum=1.704;VarDP=19 GT:AD:GQ:PL:SB 0/1:4,12,0:46:450,0,46,442,117,617:2,2,8,7 +20 10433324 . A T, 863.03 . AS_RAW_BaseQRankSum=||;AS_RAW_MQ=841.00|38317.00|0.00;AS_RAW_MQRankSum=||;AS_RAW_ReadPosRankSum=||;AS_SB_TABLE=0,1|11,9|0,0;BaseQRankSum=1.458;DP=40;MQRankSum=0.871;MQ_DP=40;QUALapprox=877;RAW_MQ=79618.00;RAW_MQandDP=79618,40;ReadPosRankSum=1.736;VarDP=21 GT:AD:GQ:PGT:PID:PL:SB 1/1:1,20,0:53:0|1:10433324_A_T:877,53,0,880,61,888:0,1,11,9 +20 10433325 . A . . END=10433325 GT:DP:GQ:MIN_DP:PL 0/0:33:24:33:0,24,1136 +20 10433326 . A T, 863.03 . AS_RAW_BaseQRankSum=||;AS_RAW_MQ=841.00|38317.00|0.00;AS_RAW_MQRankSum=||;AS_RAW_ReadPosRankSum=||;AS_SB_TABLE=0,1|11,9|0,0;BaseQRankSum=1.537;DP=36;MQRankSum=0.871;MQ_DP=36;QUALapprox=877;RAW_MQ=65218.00;RAW_MQandDP=65218,36;ReadPosRankSum=1.736;VarDP=21 GT:AD:GQ:PGT:PID:PL:SB 1/1:1,20,0:53:0|1:10433324_A_T:877,53,0,881,61,888:0,1,11,9 +20 10433327 . A . . END=10433327 GT:DP:GQ:MIN_DP:PL 0/0:32:23:32:0,23,1108 +20 10433328 . A T, 1177.03 . AS_RAW_BaseQRankSum=||;AS_RAW_MQ=0.00|38317.00|0.00;AS_RAW_MQRankSum=||;AS_RAW_ReadPosRankSum=||;AS_SB_TABLE=0,0|11,9|0,0;DP=36;MQ_DP=36;QUALapprox=1191;RAW_MQ=65218.00;RAW_MQandDP=65218,36;VarDP=20 GT:AD:GQ:PL:SB 1/1:0,20,0:74:1191,74,0,1132,93,1376:0,0,11,9 +20 10433329 . A . . END=10433344 GT:DP:GQ:MIN_DP:PL 0/0:37:23:32:0,23,1035 +20 10433346 . T . . END=10433347 GT:DP:GQ:MIN_DP:PL 0/0:38:84:38:0,84,1260 +20 10433349 . A . . END=10433350 GT:DP:GQ:MIN_DP:PL 0/0:39:84:39:0,84,1260 +20 10433351 . T . . END=10433351 GT:DP:GQ:MIN_DP:PL 0/0:37:4:37:0,4,1155 +20 10433353 . G . . END=10436226 GT:DP:GQ:MIN_DP:PL 0/0:36:27:25:0,27,882 +20 10436227 . T TTTTA, 411.05 . AS_RAW_BaseQRankSum=||;AS_RAW_MQ=0.00|29194.00|0.00;AS_RAW_MQRankSum=||;AS_RAW_ReadPosRankSum=||;AS_SB_TABLE=0,0|7,3|0,0;DP=33;MQ_DP=33;QUALapprox=425;RAW_MQ=111994.00;RAW_MQandDP=111994,33;VarDP=10 GT:AD:GQ:PL:SB 1/1:0,10,0:29:425,29,0,427,30,428:0,0,7,3 +20 10436229 . T . . END=10437000 GT:DP:GQ:MIN_DP:PL 0/0:33:30:24:0,30,450 +20 10684106 . C . . END=10684106 GT:DP:GQ:MIN_DP:PL 0/0:46:99:46:0,108,1620 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/prod.chr20snippet.withRawMQ.expected.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/prod.chr20snippet.withRawMQ.expected.g.vcf index 43e2830080b..c844e10c4d6 100644 --- a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/prod.chr20snippet.withRawMQ.expected.g.vcf +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/prod.chr20snippet.withRawMQ.expected.g.vcf @@ -17,33 +17,45 @@ ##INFO= ##INFO= ##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= +##INFO= ##INFO= ##INFO= ##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= ##INFO= ##contig= ##reference=file:///Users/gauthier/workspaces/reblockGVCF/Homo_sapiens_assembly38.fasta ##source=SelectVariants #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NWD242235 chr20 19994995 . G . . END=19996105 GT:DP:GQ:MIN_DP:PL 0/0:35:43:29:0,43,890 -chr20 19996106 . A G, 505.60 . DP=35;MQRankSum=1.225;MQ_DP=35;RAW_MQ=125316.00;RAW_MQandDP=125316.00,35;ReadPosRankSum=-1.190 GT:AD:DP:GQ:PL:SB 0/1:16,18,0:34:99:513,0,454,562,508,1070:10,6,8,10 +chr20 19996106 . A G, 505.60 . BaseQRankSum=0.086;DP=35;MQRankSum=1.225;MQ_DP=35;RAW_MQ=125316.00;RAW_MQandDP=125316,35;ReadPosRankSum=-1.190 GT:AD:DP:GQ:PL:SB 0/1:16,18,0:34:99:513,0,454,562,508,1070:10,6,8,10 chr20 19996107 . G . . END=19997993 GT:DP:GQ:MIN_DP:PL 0/0:25:20:14:0,20,436 chr20 19997994 . A . . END=19997994 GT:DP:GQ:MIN_DP:PL 0/0:21:14:21:0,14,581 chr20 19997995 . A . . END=19999277 GT:DP:GQ:MIN_DP:PL 0/0:29:23:17:0,23,541 chr20 19999278 . T . . END=19999278 GT:DP:GQ:MIN_DP:PL 0/0:24:8:24:0,8,657 chr20 19999279 . A . . END=20001360 GT:DP:GQ:MIN_DP:PL 0/0:30:22:23:0,22,585 chr20 20001361 . C . . END=20001361 GT:DP:GQ:MIN_DP:PL 0/0:30:6:30:0,6,825 -chr20 20001362 . CTT C, 133.60 . DP=22;MQRankSum=1.276;MQ_DP=22;RAW_MQ=79200.00;RAW_MQandDP=79200.00,22;ReadPosRankSum=-0.201 GT:AD:DP:GQ:PL:SB 0/1:7,7,0:14:99:141,0,151,162,172,334:3,4,1,6 +chr20 20001362 . CTT C, 133.60 . BaseQRankSum=-0.663;DP=22;MQRankSum=1.276;MQ_DP=22;RAW_MQ=79200.00;RAW_MQandDP=79200,22;ReadPosRankSum=-0.201 GT:AD:DP:GQ:PL:SB 0/1:7,7,0:14:99:141,0,151,162,172,334:3,4,1,6 chr20 20001365 . T . . END=20001365 GT:DP:GQ:MIN_DP:PL 0/0:33:0:33:0,0,681 chr20 20001366 . T . . END=20001389 GT:DP:GQ:MIN_DP:PL 0/0:27:53:24:0,53,834 chr20 20001390 . C . . END=20001390 GT:DP:GQ:MIN_DP:PL 0/0:20:0:20:0,0,536 @@ -64,9 +76,9 @@ chr20 20001418 . C . . END=20001419 GT:DP:GQ:MIN_DP:PL 0/0:26:0:26:0,0 chr20 20001420 . T . . END=20001423 GT:DP:GQ:MIN_DP:PL 0/0:26:25:25:0,25,638 chr20 20001424 . A . . END=20001425 GT:DP:GQ:MIN_DP:PL 0/0:26:0:26:0,0,606 chr20 20001426 . T . . END=20002377 GT:DP:GQ:MIN_DP:PL 0/0:30:26:17:0,26,522 -chr20 20002378 . AT A, 267.60 . DP=28;MQRankSum=0.684;MQ_DP=28;RAW_MQ=100800.00;RAW_MQandDP=100800.00,28;ReadPosRankSum=0.684 GT:AD:DP:GQ:PL:SB 0/1:14,11,0:25:99:275,0,369,317,403,720:7,7,7,4 +chr20 20002378 . AT A, 267.60 . BaseQRankSum=0.739;DP=28;MQRankSum=0.684;MQ_DP=28;RAW_MQ=100800.00;RAW_MQandDP=100800,28;ReadPosRankSum=0.684 GT:AD:DP:GQ:PL:SB 0/1:14,11,0:25:99:275,0,369,317,403,720:7,7,7,4 chr20 20002380 . T . . END=20002380 GT:DP:GQ:MIN_DP:PL 0/0:26:0:26:0,0,139 chr20 20002381 . T . . END=20004700 GT:DP:GQ:MIN_DP:PL 0/0:32:29:22:0,29,620 -chr20 20004701 . CTT C,CT, 123.03 . DP=29;MQRankSum=1.826;MQ_DP=29;RAW_MQ=102400.00;RAW_MQandDP=102400.00,29;ReadPosRankSum=1.396 GT:AD:DP:GQ:PL:SB 1/2:2,4,6,0:12:20:140,60,222,20,0,25,115,97,43,138:1,1,0,10 +chr20 20004701 . CTT C,CT, 123.03 . BaseQRankSum=0.107;DP=29;MQRankSum=1.826;MQ_DP=29;RAW_MQ=102400.00;RAW_MQandDP=102400,29;ReadPosRankSum=1.396 GT:AD:DP:GQ:PL:SB 1/2:2,4,6,0:12:20:140,60,222,20,0,25,115,97,43,138:1,1,0,10 chr20 20004704 . T . . END=20004704 GT:DP:GQ:MIN_DP:PL 0/0:28:0:28:0,0,585 chr20 20004705 . T . . END=20005011 GT:DP:GQ:MIN_DP:PL 0/0:25:32:14:0,32,442 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testJustOneSample.expected.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testJustOneSample.expected.g.vcf index a0b6b2b2c12..948108af011 100644 --- a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testJustOneSample.expected.g.vcf +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testJustOneSample.expected.g.vcf @@ -10,28 +10,44 @@ ##FORMAT= ##GVCFBlock0-20=minGQ=0(inclusive),maxGQ=20(exclusive) ##GVCFBlock20-100=minGQ=20(inclusive),maxGQ=100(exclusive) +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= +##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= ##INFO= ##INFO= ##INFO= +##INFO= ##INFO= ##contig= ##source=SelectVariants #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA1 chr20 69485 . G . . END=69510 GT:DP:GQ:MIN_DP:PL 0/0:94:99:94:0,120,1800 -chr20 69511 . A G, 2270.03 . DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;RAW_MQandDP=2546.10,82;ReadPosRankSum=1.689 GT:AD:DP:GQ:PL:SB 1/1:1,79,0:80:99:2284,207,0,2287,237,2316:0,1,46,33 +chr20 69511 . A G, 2270.03 . BaseQRankSum=1.169;DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;RAW_MQandDP=79056,82;ReadPosRankSum=1.689 GT:AD:DP:GQ:PL:SB 1/1:1,79,0:80:99:2284,207,0,2287,237,2316:0,1,46,33 chr20 69512 . A . . END=69521 GT:DP:GQ:MIN_DP:PL 0/0:96:99:96:0,120,1800 chr20 69522 . A . . END=69635 GT:DP:GQ:MIN_DP:PL 0/0:7:0:6:0,0,0 chr20 69762 . A . . END=69762 GT:DP:GQ:MIN_DP:PL 0/0:7:18:7:0,18,270 chr20 69763 . A . . END=69766 GT:DP:GQ:MIN_DP:PL 0/0:7:21:7:0,21,253 chr20 69767 . A . . END=69770 GT:DP:GQ:MIN_DP:PL 0/0:7:12:7:0,12,180 -chr20 69771 . TAAAAA T, 12.59 . DP=7;MQ=34.15;MQRankSum=1.300;MQ_DP=7;RAW_MQandDP=239.05,7;ReadPosRankSum=1.754 GT:AD:DP:GQ:PL:SB 0/1:0,0,0:0:20:20,0,119,101,128,229:0,4,0,3 +chr20 69771 . TAAAAA T, 12.59 . BaseQRankSum=0.937;DP=7;MQ=34.15;MQRankSum=1.300;MQ_DP=7;RAW_MQandDP=8164,7;ReadPosRankSum=1.754 GT:AD:DP:GQ:PL:SB 0/1:0,0,0:0:20:20,0,119,101,128,229:0,4,0,3 chr20 69777 . G . . END=69783 GT:DP:GQ:MIN_DP:PL 0/0:7:0:7:0,0,0 -chr20 69785 . T G, 2270.03 . DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;RAW_MQandDP=2546.10,82;ReadPosRankSum=1.689 GT:DP:GQ:PL:SB 1/1:80:99:2284,207,0,2287,237,2316:0,1,46,33 +chr20 69785 . T G, 2270.03 . BaseQRankSum=1.169;DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;RAW_MQandDP=79056,82;ReadPosRankSum=1.689 GT:DP:GQ:PL:SB 1/1:80:99:2284,207,0,2287,237,2316:0,1,46,33 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testNonRefADCorrection.expected.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testNonRefADCorrection.expected.g.vcf index 384933535e4..ffeeccbff6b 100644 --- a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testNonRefADCorrection.expected.g.vcf +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testNonRefADCorrection.expected.g.vcf @@ -18,24 +18,36 @@ ##INFO= ##INFO= ##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= ##INFO= ##INFO= ##INFO= ##INFO= ##INFO= +##INFO= ##INFO= ##contig= ##reference=file:///seq/references/Homo_sapiens_assembly38/v0/Homo_sapiens_assembly38.fasta ##source=SelectVariants #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT HK017-0046 -chr20 1133569 . A ATATATATATATATATATATTT, 261.64 . DP=22;MQRankSum=1.380;MQ_DP=22;RAW_MQ=69700.00;RAW_MQandDP=69700.00,22;ReadPosRankSum=0.000 GT:AD:DP:GQ:PL:SB 0/1:2,4,0:6:30:269,0,253,30,51,87:0,2,3,1 -chr20 1133750 . A G,AGAATGGAATG, 419.27 . DP=121;MQ=37.23;MQ_DP=121;RAW_MQandDP=4504.83,121 GT:AD:DP:GQ:PL:SB 1/3:0,6,0,0:6:9:436,21,9,291,45,834,242,0,270,220:0,0,5,1 +chr20 1133569 . A ATATATATATATATATATATTT, 261.64 . DP=22;MQRankSum=1.380;MQ_DP=22;RAW_MQ=69700.00;RAW_MQandDP=69700,22;ReadPosRankSum=0.000 GT:AD:DP:GQ:PL:SB 0/1:2,4,0:6:30:269,0,253,30,51,87:0,2,3,1 +chr20 1133750 . A G,AGAATGGAATG, 419.27 . DP=121;MQ=37.23;MQ_DP=121;RAW_MQandDP=167715,121 GT:AD:DP:GQ:PL:SB 1/3:0,6,0,0:6:9:436,21,9,291,45,834,242,0,270,220:0,0,5,1 diff --git a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testOneSampleAsForGnomAD.expected.g.vcf b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testOneSampleAsForGnomAD.expected.g.vcf index 72b84bf08b9..07cd1127f65 100644 --- a/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testOneSampleAsForGnomAD.expected.g.vcf +++ b/src/test/resources/org/broadinstitute/hellbender/tools/walkers/variantutils/ReblockGVCF/testOneSampleAsForGnomAD.expected.g.vcf @@ -26,12 +26,12 @@ ##source=SelectVariants #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA1 chr20 69485 . G . . END=69510 GT:DP:GQ:MIN_DP:PL 0/0:94:99:94:0,120,1800 -chr20 69511 . A G, 2270.03 . DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;QUALapprox=2284;RAW_MQandDP=2546.10,82;ReadPosRankSum=1.689;VarDP=80 GT:AD:DP:GQ:PL:SB 1/1:1,79,0:80:99:2284,207,0,2287,237,2316:0,1,46,33 +chr20 69511 . A G, 2270.03 . DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;QUALapprox=2284;RAW_MQandDP=79056,82;ReadPosRankSum=1.689;VarDP=80 GT:AD:DP:GQ:PL:SB 1/1:1,79,0:80:99:2284,207,0,2287,237,2316:0,1,46,33 chr20 69512 . A . . END=69521 GT:DP:GQ:MIN_DP:PL 0/0:96:99:96:0,120,1800 chr20 69549 . T . . END=69634 GT:DP:GQ:MIN_DP:PL 0/0:6:16:6:0,16,90 -chr20 69635 . A T, 2.64 . DP=7;MQ=34.15;MQRankSum=1.300;MQ_DP=7;QUALapprox=10;RAW_MQandDP=239.05,7;ReadPosRankSum=1.754;VarDP=7 GT:AD:DP:GQ:PL:SB 0/1:4,3,0:7:10:10,0,119,101,128,229:0,4,0,3 +chr20 69635 . A T, 2.64 . DP=7;MQ=34.15;MQRankSum=1.300;MQ_DP=7;QUALapprox=10;RAW_MQandDP=8164,7;ReadPosRankSum=1.754;VarDP=7 GT:AD:DP:GQ:PL:SB 0/1:4,3,0:7:10:10,0,119,101,128,229:0,4,0,3 chr20 69762 . A . . END=69762 GT:DP:GQ:MIN_DP:PL 0/0:7:18:7:0,18,270 chr20 69763 . A . . END=69766 GT:DP:GQ:MIN_DP:PL 0/0:7:21:7:0,21,253 chr20 69767 . A . . END=69770 GT:DP:GQ:MIN_DP:PL 0/0:7:12:7:0,12,180 -chr20 69771 . TAAAAA T, 12.59 . DP=7;MQ=34.15;MQRankSum=1.300;MQ_DP=7;QUALapprox=20;RAW_MQandDP=239.05,7;ReadPosRankSum=1.754;VarDP=7 GT:AD:DP:GQ:PL:SB 0/1:0,0,0:0:20:20,0,119,101,128,229:0,4,0,3 -chr20 69785 . T G, 2270.03 . DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;QUALapprox=2284;RAW_MQandDP=2546.10,82;ReadPosRankSum=1.689;VarDP=80 GT:DP:GQ:PL:SB 1/1:80:99:2284,207,0,2287,237,2316:0,1,46,33 +chr20 69771 . TAAAAA T, 12.59 . DP=7;MQ=34.15;MQRankSum=1.300;MQ_DP=7;QUALapprox=20;RAW_MQandDP=8164,7;ReadPosRankSum=1.754;VarDP=7 GT:AD:DP:GQ:PL:SB 0/1:0,0,0:0:20:20,0,119,101,128,229:0,4,0,3 +chr20 69785 . T G, 2270.03 . DP=82;MQ=31.05;MQRankSum=-0.866;MQ_DP=82;QUALapprox=2284;RAW_MQandDP=79056,82;ReadPosRankSum=1.689;VarDP=80 GT:DP:GQ:PL:SB 1/1:80:99:2284,207,0,2287,237,2316:0,1,46,33