src/hg/utils/mutationClassifier/mutationClassifier.c 1.3

1.3 2010/02/02 09:08:36 larrym
remove some cruft in SPLICE_SITE code
Index: src/hg/utils/mutationClassifier/mutationClassifier.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/utils/mutationClassifier/mutationClassifier.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -B -U 4 -r1.2 -r1.3
--- src/hg/utils/mutationClassifier/mutationClassifier.c	2 Feb 2010 08:03:09 -0000	1.2
+++ src/hg/utils/mutationClassifier/mutationClassifier.c	2 Feb 2010 09:08:36 -0000	1.3
@@ -480,19 +480,20 @@
             for(i=0;i<gp->exonCount;i++)
                 {
                 int start = gp->exonStarts[i] - overlapA->chromStart;
                 int end   = overlapA->chromEnd - gp->exonEnds[i];
-                if (i == 0 && (end > 0 && end <= 2))
-                    code = SPLICE_SITE;
-                else if ((i == (gp->exonCount - 1)) && (start > 0 && start <= 2))
-                    code = SPLICE_SITE;
-                else if ((start > 0 && start <= 2) || (end > 0 && end <= 2))
+                // XXXX I still think this isn't quite right (not sure if we s/d use chromEnd or chromStart).
+                if (i == 0)
+                    {
+                    if(end == 1 || end == 2)
                     code = SPLICE_SITE;
-                if(i > 0 && (overlapA->chromEnd + 1) >= gp->exonStarts[i])
-                    // mutation at end of intron
+                    }
+                else if (i == (gp->exonCount - 1))
+                    {
+                    if(start == 1 || start == 2)
                     code = SPLICE_SITE;
-                else if(i < (gp->exonCount - 1) && (overlapA->chromStart - 1) <= gp->exonEnds[i])
-                    // mutation at beginning of intron
+                    }
+                else if ((start == 1 || start == 2) || (end == 1 || end == 2))
                     code = SPLICE_SITE;
                 }
             }
         }