src/hg/hgTracks/hapmapTrack.c 1.47

1.47 2009/03/09 21:17:52 angie
Added support for hapmapSnpsPhaseII track (replaced by the new PhaseIII track in 18, but kept around in case folks relied on its het. calcs).
Index: src/hg/hgTracks/hapmapTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/hapmapTrack.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -b -B -U 4 -r1.46 -r1.47
--- src/hg/hgTracks/hapmapTrack.c	9 Mar 2009 19:10:16 -0000	1.46
+++ src/hg/hgTracks/hapmapTrack.c	9 Mar 2009 21:17:52 -0000	1.47
@@ -201,8 +201,11 @@
 
 char orthoTable[HDB_MAX_TABLE_STRING];
 for (i = 0;  i < HAP_ORTHO_COUNT;  i++)
     {
+    if (endsWith(tg->mapName, "PhaseII"))
+	safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%sPhaseII", hapmapOrthoSpecies[i]);
+    else
     safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%s", hapmapOrthoSpecies[i]);
     if (sameString(tg->mapName, orthoTable))
 	{
 	struct hapmapAllelesOrtho *orthoLoadItem, *orthoItemList = NULL;
@@ -604,8 +607,11 @@
 int i;
 char orthoTable[HDB_MAX_TABLE_STRING];
 for (i = 0;  i < HAP_ORTHO_COUNT;  i++)
     {
+    if (endsWith(tg->mapName, "PhaseII"))
+	safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%sPhaseII", hapmapOrthoSpecies[i]);
+    else
     safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%s", hapmapOrthoSpecies[i]);
     if (sameString(tg->mapName, orthoTable))
 	{
 	struct hapmapAllelesOrtho *orthoLoadItem, *orthoItemList = NULL;
@@ -824,8 +830,11 @@
 int i;
 char orthoTable[HDB_MAX_TABLE_STRING];
 for (i = 0;  i < HAP_ORTHO_COUNT;  i++)
     {
+    if (endsWith(tg->mapName, "PhaseII"))
+	safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%sPhaseII", hapmapOrthoSpecies[i]);
+    else
     safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%s", hapmapOrthoSpecies[i]);
     if (sameString(tg->mapName, orthoTable))
 	{
 	struct hapmapAllelesOrtho *thisItem = item;
@@ -887,8 +896,11 @@
 int i;
 char orthoTable[HDB_MAX_TABLE_STRING];
 for (i = 0;  i < HAP_ORTHO_COUNT;  i++)
     {
+    if (endsWith(tg->mapName, "PhaseII"))
+	safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%sPhaseII", hapmapOrthoSpecies[i]);
+    else
     safef(orthoTable, sizeof(orthoTable), "hapmapAlleles%s", hapmapOrthoSpecies[i]);
     if (sameString(tg->mapName, orthoTable))
 	{
 	struct hapmapAllelesOrtho *thisItem = item;