78e58e35abfe32f6d3a2708e07666af59454d159 hiram Fri Jan 24 08:45:45 2014 -0800 gather in the diaspora of haplotype check routines and add hg38 haplotype recognition refs #11681 diff --git src/lib/common.c src/lib/common.c index b454b46..ca77022 100644 --- src/lib/common.c +++ src/lib/common.c @@ -3480,15 +3480,24 @@ } char *dateAddTo(char *date,char *format,int addYears,int addMonths,int addDays) /* Add years,months,days to a formatted date and returns the new date as a cloned string * format is a strptime/strftime format: %F = yyyy-mm-dd */ { char *newDate = needMem(12); struct tm tp; if (strptime(date,format, &tp)) { dateAdd(&tp,addYears,addMonths,addDays); // tp.tm_year only contains years since 1900 strftime(newDate,12,format,&tp); } return cloneString(newDate); // newDate is never freed! } + +boolean haplotype(const char *name) +/* Is this name a haplotype name ? _hap or _alt in the name */ +{ +if (stringIn("_hap", name) || stringIn("_alt", name)) + return TRUE; +else + return FALSE; +}