N reference base fix for SSG
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1572 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
bc9fe31cf5
commit
0093482c62
|
|
@ -92,6 +92,7 @@ public class SingleSampleGenotyper extends LocusWalker<SSGenotypeCall, SingleSam
|
||||||
*/
|
*/
|
||||||
public SSGenotypeCall map(RefMetaDataTracker tracker, ReferenceContext refContext, AlignmentContext context) {
|
public SSGenotypeCall map(RefMetaDataTracker tracker, ReferenceContext refContext, AlignmentContext context) {
|
||||||
char ref = refContext.getBase();
|
char ref = refContext.getBase();
|
||||||
|
if ( BaseUtils.isRegularBase(ref) ) {
|
||||||
DiploidGenotypePriors priors = new DiploidGenotypePriors(ref, heterozygosity, DiploidGenotypePriors.PROB_OF_TRISTATE_GENOTYPE);
|
DiploidGenotypePriors priors = new DiploidGenotypePriors(ref, heterozygosity, DiploidGenotypePriors.PROB_OF_TRISTATE_GENOTYPE);
|
||||||
|
|
||||||
// setup GenotypeLike object
|
// setup GenotypeLike object
|
||||||
|
|
@ -104,6 +105,9 @@ public class SingleSampleGenotyper extends LocusWalker<SSGenotypeCall, SingleSam
|
||||||
gl.validate();
|
gl.validate();
|
||||||
|
|
||||||
return new SSGenotypeCall(!GENOTYPE, context.getLocation(), ref,gl, pileup);
|
return new SSGenotypeCall(!GENOTYPE, context.getLocation(), ref,gl, pileup);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,10 @@ public class BaseUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public boolean isRegularBase(char base) {
|
||||||
|
return simpleBaseToBaseIndex(base) != -1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a base index to a simple base
|
* Converts a base index to a simple base
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue