src/hg/snp/snpLoad/snpNcbiToUcsc.c 1.11
1.11 2009/08/31 23:38:46 angie
If refNCBI is wrong size (or snp coords are wrong), make an error instead of aborting. Don't abort on between+in-del -- between size is 0, min observed size can be 0 (-).
Index: src/hg/snp/snpLoad/snpNcbiToUcsc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/snp/snpLoad/snpNcbiToUcsc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/hg/snp/snpLoad/snpNcbiToUcsc.c 22 May 2009 20:24:58 -0000 1.10
+++ src/hg/snp/snpLoad/snpNcbiToUcsc.c 31 Aug 2009 23:38:46 -0000 1.11
@@ -1002,10 +1002,13 @@
MAX_SNPSIZE, rsId, chr, chrStart, chrEnd, snpSize);
if (chrStart == chrEnd)
/* copy whatever convention dbSNP uses for insertion */
return refNCBI;
-else if (strlen(refNCBI) == snpSize)
+else
{
+ if (strlen(refNCBI) != snpSize)
+ writeError("rs%d is %d bases long but refNCBI is different length: %s",
+ rsId, snpSize, refNCBI);
strncpy(refUCSC, chrSeq->dna + chrStart, snpSize);
refUCSC[snpSize] = '\0';
if (! sameString(refNCBI, refUCSC))
writeException(RefAlleleMismatch);
@@ -1019,11 +1022,8 @@
if (sameString(refNCBI, refUCSCRC) &&
!sameString(refNCBI, refUCSC)) /* Don't flag if seq = revcomp seq */
writeException(RefAlleleRevComp);
}
-else
- lineFileAbort(lf, "What should refUCSC be for rs%d? "
- "(refNCBI=%s, snpSize=%d", rsId, refNCBI, snpSize);
return refUCSC;
}
char *reverseComplementObserved(char *observed)
@@ -1424,11 +1424,8 @@
safecpy(class, classSize, "insertion");
classStringsUsed[stringArrayIx("insertion", classStrings,
ArraySize(classStrings))] = TRUE;
}
- if (sameString(locType, "between") && !sameString(class, "insertion"))
- lineFileAbort(lf, "locType \"between\" should be identified "
- "as an insertion here.");
}
}
void checkCluster(struct lineFile *lf, char strand, char *observed)