SNPs no longer fail this filter if they are actually hom in reads

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1319 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-07-27 15:20:43 +00:00
parent f2b3fa83ac
commit 73ddf21bb7
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,8 @@ public class VECFisherStrand implements VariantExclusionCriterion {
public static boolean strandTest(char ref, LocusContext context, int allele1, int allele2, double threshold, StringBuffer out) {
int[][] table = getContingencyTable(context, allele1, allele2);
if ( !variantIsHet(table) )
return false;
double pCutoff = computePValue(table);
//printTable(table, pCutoff);
@ -75,6 +77,10 @@ public class VECFisherStrand implements VariantExclusionCriterion {
return pValue < threshold;
}
private static boolean variantIsHet(int[][] table) {
return ((table[0][1] != 0 || table[0][1] != 0) && (table[1][0] != 0 || table[1][1] != 0));
}
private void printTable(int[][] table, double pValue) {
System.out.printf("%d %d; %d %d : %f\n", table[0][0], table[0][1], table[1][0], table[1][1], pValue);
}