From 341e93ee123e72e6f5ff374369a7f1ce88a531ae Mon Sep 17 00:00:00 2001 From: chartl Date: Tue, 19 Oct 2010 12:50:24 +0000 Subject: [PATCH] The reference fixer seems to have munged the OMNI rather than making it better. Looks like some sites need to only have the ref and alt bases swapped, and others need to have the genotypes swapped as well? E.g. some subset need A C 1/1 --> C A 0/0 while another subset need A C 1/1 --> C A 1/1 it's unclear how big these subsets are (or even if one is empty). What I do know is, doing the first one totally screws up concordance metrics for the 421-sample chip. So either something else needs to be done, or there's a bug in this walker. Until I know for sure, I've added an initialize exception to disable this thing... git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4523 348d0f76-0448-11de-a6fe-93d51630548a --- .../oneoffprojects/walkers/vcftools/FixRefBases.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/FixRefBases.java b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/FixRefBases.java index 605d0b223..71c6b4b8f 100755 --- a/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/FixRefBases.java +++ b/java/src/org/broadinstitute/sting/oneoffprojects/walkers/vcftools/FixRefBases.java @@ -7,6 +7,8 @@ import org.broad.tribble.vcf.VCFConstants; import org.broad.tribble.vcf.VCFHeader; import org.broad.tribble.vcf.VCFHeaderLine; import org.broad.tribble.vcf.VCFWriter; +import org.broadinstitute.sting.commandline.Argument; +import org.broadinstitute.sting.commandline.Hidden; import org.broadinstitute.sting.commandline.Output; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; @@ -15,6 +17,7 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; import org.broadinstitute.sting.gatk.walkers.RMD; import org.broadinstitute.sting.gatk.walkers.Requires; import org.broadinstitute.sting.gatk.walkers.RodWalker; +import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; import org.broadinstitute.sting.utils.exceptions.StingException; import org.broadinstitute.sting.utils.vcf.VCFUtils; import org.broadinstitute.sting.utils.SampleUtils; @@ -32,8 +35,14 @@ import java.util.*; public class FixRefBases extends RodWalker { @Output(doc="output file to write to",required=true) VCFWriter out; + @Hidden + @Argument(doc="",fullName="bypassException",required=false) + boolean bypass = false; public void initialize() { + if ( ! bypass ) { + throw new ReviewedStingException("This walker is currently broken. This exception is being thrown because you will not get out what you think you will."); + } Map vcfRods = VCFUtils.getVCFHeadersFromRods(getToolkit(), Arrays.asList("variant")); Set vcfSamples = SampleUtils.getSampleList(vcfRods, VariantContextUtils.GenotypeMergeType.REQUIRE_UNIQUE); Set headerLines = VCFUtils.smartMergeHeaders(vcfRods.values(), logger);