Useful debugging argument added to VariantRecalibrator to only use sites whose qual field is above --qual
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4406 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
575c38fc04
commit
2f7892601c
|
|
@ -312,7 +312,7 @@ public class VariantContextUtils {
|
||||||
String rsID = null;
|
String rsID = null;
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
|
|
||||||
// counting the number of filtered and varint VCs
|
// counting the number of filtered and variant VCs
|
||||||
int nFiltered = 0, nVariant = 0;
|
int nFiltered = 0, nVariant = 0;
|
||||||
|
|
||||||
Allele refAllele = determineReferenceAllele(VCs);
|
Allele refAllele = determineReferenceAllele(VCs);
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,9 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
||||||
@Hidden
|
@Hidden
|
||||||
@Argument(fullName = "NoByHapMapValidationStatus", shortName = "NoByHapMapValidationStatus", doc = "Don't consider sites in dbsnp rod tagged as by-hapmap validation status as real HapMap sites. FOR DEBUGGING PURPOSES ONLY.", required=false)
|
@Argument(fullName = "NoByHapMapValidationStatus", shortName = "NoByHapMapValidationStatus", doc = "Don't consider sites in dbsnp rod tagged as by-hapmap validation status as real HapMap sites. FOR DEBUGGING PURPOSES ONLY.", required=false)
|
||||||
private Boolean NO_BY_HAPMAP_VALIDATION_STATUS = false;
|
private Boolean NO_BY_HAPMAP_VALIDATION_STATUS = false;
|
||||||
|
@Hidden
|
||||||
|
@Argument(fullName = "qual", shortName = "qual", doc = "Don't use sites below the qual threshold. FOR DEBUGGING PURPOSES ONLY.", required=false)
|
||||||
|
private double QUAL_THRESHOLD = 0.0;
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
// Private Member Variables
|
// Private Member Variables
|
||||||
|
|
@ -217,6 +220,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
||||||
for( final VariantContext vc : tracker.getVariantContexts(ref, inputNames, null, context.getLocation(), false, false) ) {
|
for( final VariantContext vc : tracker.getVariantContexts(ref, inputNames, null, context.getLocation(), false, false) ) {
|
||||||
if( vc != null && vc.isSNP() ) {
|
if( vc != null && vc.isSNP() ) {
|
||||||
if( !vc.isFiltered() || IGNORE_ALL_INPUT_FILTERS || (ignoreInputFilterSet != null && ignoreInputFilterSet.containsAll(vc.getFilters())) ) {
|
if( !vc.isFiltered() || IGNORE_ALL_INPUT_FILTERS || (ignoreInputFilterSet != null && ignoreInputFilterSet.containsAll(vc.getFilters())) ) {
|
||||||
|
if( vc.getPhredScaledQual() >= QUAL_THRESHOLD ) {
|
||||||
final VariantDatum variantDatum = new VariantDatum();
|
final VariantDatum variantDatum = new VariantDatum();
|
||||||
variantDatum.isTransition = VariantContextUtils.getSNPSubstitutionType(vc).compareTo(BaseUtils.BaseSubstitutionType.TRANSITION) == 0;
|
variantDatum.isTransition = VariantContextUtils.getSNPSubstitutionType(vc).compareTo(BaseUtils.BaseSubstitutionType.TRANSITION) == 0;
|
||||||
|
|
||||||
|
|
@ -287,6 +291,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
||||||
VariantContext newVC = VariantContext.modifyPErrorFiltersAndAttributes(vc, variantDatum.qual / 10.0, new HashSet<String>(), attrs);
|
VariantContext newVC = VariantContext.modifyPErrorFiltersAndAttributes(vc, variantDatum.qual / 10.0, new HashSet<String>(), attrs);
|
||||||
|
|
||||||
vcfWriter.add( newVC, ref.getBase() );
|
vcfWriter.add( newVC, ref.getBase() );
|
||||||
|
}
|
||||||
|
|
||||||
} else { // not a SNP or is filtered so just dump it out to the VCF file
|
} else { // not a SNP or is filtered so just dump it out to the VCF file
|
||||||
vcfWriter.add( vc, ref.getBase() );
|
vcfWriter.add( vc, ref.getBase() );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue