src/hg/hgc/hgc.c 1.1585
1.1585 2010/01/05 23:10:35 angie
doHapMapSnpsAllPops: don't warn about differering alleles if one is the empty string -- in older hapmapSnps (phase II) tables, allele2 was empty when homoCount2 and heteroCount were both 0.
Index: src/hg/hgc/hgc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/hgc.c,v
retrieving revision 1.1584
retrieving revision 1.1585
diff -b -B -U 4 -r1.1584 -r1.1585
--- src/hg/hgc/hgc.c 4 Jan 2010 19:12:26 -0000 1.1584
+++ src/hg/hgc/hgc.c 5 Jan 2010 23:10:35 -0000 1.1585
@@ -18924,10 +18924,13 @@
{
allele1 = item->allele1;
allele2 = item->allele2;
}
- else if (!sameString(allele1, item->allele1) || !sameString(allele2, item->allele2))
- warn("Allele order in hapmapSnps%s is different from earlier table(s)", popCode);
+ else if (!sameString(allele1, item->allele1) ||
+ (isNotEmpty(allele2) && isNotEmpty(item->allele2) &&
+ !sameString(allele2, item->allele2)))
+ warn("Allele order in hapmapSnps%s (%s/%s) is different from earlier table(s) (%s/%s)",
+ popCode, item->allele1, item->allele2, allele1, allele2);
totalA1Count += 2*item->homoCount1 + item->heteroCount;
totalA2Count += 2*item->homoCount2 + item->heteroCount;
totalHaploCount += haploCounts[i];
sumHet += ((float)item->heteroCount /