change the default VCFs gatherer of the GATK (not just the UG)

This commit is contained in:
Ami Levy-Moonshine 2013-01-18 15:03:12 -05:00
parent fcb3c6dc2a
commit 826c29827b
3 changed files with 16 additions and 7 deletions

View File

@ -176,7 +176,7 @@ public class UnifiedGenotyper extends LocusWalker<List<VariantCallContext>, Unif
/** /**
* A raw, unfiltered, highly sensitive callset in VCF format. * A raw, unfiltered, highly sensitive callset in VCF format.
*/ */
@Gather(className = "org.broadinstitute.sting.queue.extensions.gatk.CatVariantsGatherer") //@Gather(className = "org.broadinstitute.sting.queue.extensions.gatk.CatVariantsGatherer")
@Output(doc="File to which variants should be written",required=true) @Output(doc="File to which variants should be written",required=true)
protected VariantContextWriter writer = null; protected VariantContextWriter writer = null;

View File

@ -158,12 +158,18 @@ public abstract class ArgumentDefinitionField extends ArgumentField {
List<ArgumentField> fields = new ArrayList<ArgumentField>(); List<ArgumentField> fields = new ArrayList<ArgumentField>();
String gatherClass; String gatherClass;
// one can set the specific gatherer to use by adding @Gather before any output argument.
// For example (used to be part of UG):
// @Gather(className = "org.broadinstitute.sting.queue.extensions.gatk.CatVariantsGatherer")
// @Output(doc="File to which variants should be written",required=true)
// protected VariantContextWriter writer = null;
if (gatherer != null) if (gatherer != null)
gatherClass = gatherer; gatherClass = gatherer;
else if (SAMFileWriter.class.isAssignableFrom(argumentDefinition.argumentType)) else if (SAMFileWriter.class.isAssignableFrom(argumentDefinition.argumentType))
gatherClass = "BamGatherFunction"; gatherClass = "BamGatherFunction";
else if (VariantContextWriter.class.isAssignableFrom(argumentDefinition.argumentType)) else if (VariantContextWriter.class.isAssignableFrom(argumentDefinition.argumentType))
gatherClass = "VcfGatherFunction"; gatherClass = "CatVariantsGatherer"; // used to be "VcfGatherFunction";
else else
gatherClass = "org.broadinstitute.sting.queue.function.scattergather.SimpleTextGatherFunction"; gatherClass = "org.broadinstitute.sting.queue.function.scattergather.SimpleTextGatherFunction";

View File

@ -30,11 +30,13 @@ import org.broadinstitute.sting.queue.function.scattergather.GatherFunction
/** /**
* Created with IntelliJ IDEA. *
* User: ami * Currently this is the default gather for VCFs.
* Date: 12/11/12 * One can set a specific gatherer to use by adding @Gather before any output argument.
* Time: 2:04 PM * For example (used to be part of UG):
* To change this template use File | Settings | File Templates. * @Gather(className = "org.broadinstitute.sting.queue.extensions.gatk.CatVariantsGatherer")
* @Output(doc="File to which variants should be written",required=true)
* protected VariantContextWriter writer = null;
*/ */
class CatVariantsGatherer extends CatVariants with GatherFunction with RetryMemoryLimit{ class CatVariantsGatherer extends CatVariants with GatherFunction with RetryMemoryLimit{
this.assumeSorted = true this.assumeSorted = true
@ -45,6 +47,7 @@ class CatVariantsGatherer extends CatVariants with GatherFunction with RetryMemo
this.reference = originalGATK.reference_sequence this.reference = originalGATK.reference_sequence
this.variant = this.gatherParts.zipWithIndex map { case (input, index) => new TaggedFile(input, "input"+index) } this.variant = this.gatherParts.zipWithIndex map { case (input, index) => new TaggedFile(input, "input"+index) }
this.outputFile = this.originalOutput this.outputFile = this.originalOutput
this.assumeSorted = true
super.freezeFieldValues() super.freezeFieldValues()
} }