Added ability to output just sites (no genotypes) from UG with the --sites_only argument. Note that we do still genotype in this mode so that the INFO annotations are identical, but we strip the genotypes out of the VC right before writing to output. In other words, this is not designed to make UG go faster; the point here is to allow downstream tools not to have to parse GTs if they don't want to. Here you go, Ryan.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5081 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
01e032e89c
commit
0429301536
|
|
@ -45,6 +45,9 @@ public class UnifiedArgumentCollection {
|
|||
public Double PCR_error = DiploidSNPGenotypeLikelihoods.DEFAULT_PCR_ERROR_RATE;
|
||||
|
||||
// control the output
|
||||
@Argument(fullName = "sites_only", shortName = "sites_only", doc = "Should we output just sites without genotypes (i.e. only the first 8 columns of the VCF)?", required = false)
|
||||
public boolean SITES_ONLY = false;
|
||||
|
||||
@Argument(fullName = "genotype", shortName = "genotype", doc = "Should we output confident genotypes (i.e. including ref calls) or just the variants?", required = false)
|
||||
public boolean GENOTYPE_MODE = false;
|
||||
|
||||
|
|
@ -106,6 +109,7 @@ public class UnifiedArgumentCollection {
|
|||
uac.GLmodel = GLmodel;
|
||||
uac.heterozygosity = heterozygosity;
|
||||
uac.PCR_error = PCR_error;
|
||||
uac.SITES_ONLY = SITES_ONLY;
|
||||
uac.GENOTYPE_MODE = GENOTYPE_MODE;
|
||||
uac.ALL_BASES_MODE = ALL_BASES_MODE;
|
||||
uac.NO_SLOD = NO_SLOD;
|
||||
|
|
|
|||
|
|
@ -129,6 +129,9 @@ public class UnifiedGenotyper extends LocusWalker<VariantCallContext, UnifiedGen
|
|||
annotationEngine = new VariantAnnotatorEngine(getToolkit(), Arrays.asList(annotationClassesToUse), annotationsToUse);
|
||||
UG_engine = new UnifiedGenotyperEngine(getToolkit(), UAC, logger, verboseWriter, annotationEngine, samples);
|
||||
|
||||
if ( UAC.SITES_ONLY )
|
||||
samples.clear();
|
||||
|
||||
// initialize the header
|
||||
writer.writeHeader(new VCFHeader(getHeaderInfo(), samples)) ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -400,6 +400,9 @@ public class UnifiedGenotyperEngine {
|
|||
vcCall = variantContexts.iterator().next(); // we know the collection will always have exactly 1 element.
|
||||
}
|
||||
|
||||
if ( UAC.SITES_ONLY )
|
||||
vcCall = VariantContext.modifyGenotypes(vcCall, null);
|
||||
|
||||
VariantCallContext call = new VariantCallContext(vcCall, passesCallThreshold(phredScaledConfidence, atTriggerTrack));
|
||||
call.setRefBase(refContext.getBase());
|
||||
return call;
|
||||
|
|
|
|||
Loading…
Reference in New Issue