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,18 +92,22 @@ public class SingleSampleGenotyper extends LocusWalker<SSGenotypeCall, SingleSam
|
|||
*/
|
||||
public SSGenotypeCall map(RefMetaDataTracker tracker, ReferenceContext refContext, AlignmentContext context) {
|
||||
char ref = refContext.getBase();
|
||||
DiploidGenotypePriors priors = new DiploidGenotypePriors(ref, heterozygosity, DiploidGenotypePriors.PROB_OF_TRISTATE_GENOTYPE);
|
||||
if ( BaseUtils.isRegularBase(ref) ) {
|
||||
DiploidGenotypePriors priors = new DiploidGenotypePriors(ref, heterozygosity, DiploidGenotypePriors.PROB_OF_TRISTATE_GENOTYPE);
|
||||
|
||||
// setup GenotypeLike object
|
||||
GenotypeLikelihoods gl = GenotypeLikelihoodsFactory.makeGenotypeLikelihoods(baseModel, priors, defaultPlatform);
|
||||
// setup GenotypeLike object
|
||||
GenotypeLikelihoods gl = GenotypeLikelihoodsFactory.makeGenotypeLikelihoods(baseModel, priors, defaultPlatform);
|
||||
|
||||
gl.setVerbose(VERBOSE);
|
||||
gl.setEnableCacheFlag(! disableCache);
|
||||
ReadBackedPileup pileup = new ReadBackedPileup(ref, context);
|
||||
gl.add(pileup, true);
|
||||
gl.validate();
|
||||
gl.setVerbose(VERBOSE);
|
||||
gl.setEnableCacheFlag(! disableCache);
|
||||
ReadBackedPileup pileup = new ReadBackedPileup(ref, context);
|
||||
gl.add(pileup, true);
|
||||
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
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue