src/hg/visiGene/vgProbeTrack/vgProbeTrack.c 1.15

1.15 2009/10/13 05:37:19 galt
handle 2bit as well as nib
Index: src/hg/visiGene/vgProbeTrack/vgProbeTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/visiGene/vgProbeTrack/vgProbeTrack.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -b -B -U 4 -r1.14 -r1.15
--- src/hg/visiGene/vgProbeTrack/vgProbeTrack.c	13 Oct 2009 05:21:55 -0000	1.14
+++ src/hg/visiGene/vgProbeTrack/vgProbeTrack.c	13 Oct 2009 05:37:19 -0000	1.15
@@ -1322,16 +1322,21 @@
 char cmd[256];
 
 struct dyString *dy = dyStringNew(0);
 char path[256];
+char dnaPath[256];
 char toDb[12];
 
 safef(toDb,sizeof(toDb),"%s", db);
 toDb[0]=toupper(toDb[0]);
 
-safef(path,sizeof(path),"/cluster/data/%s/nib", db);
-if (!fileExists(path))
-    errAbort("unable to locate nib dir %s",path);
+safef(dnaPath,sizeof(dnaPath),"/cluster/data/%s/nib", db);
+if (!fileExists(dnaPath))
+    {
+    safef(dnaPath,sizeof(dnaPath),"/cluster/data/%s/%s.2bit", db, db);
+    if (!fileExists(dnaPath))
+	errAbort("unable to locate nib dir or .2bit for %s: %s", db, dnaPath);
+    }
     
 safef(path,sizeof(path),"/gbdb/%s/liftOver/%sTo%s.over.chain.gz", fromDb, fromDb, toDb);
 if (!fileExists(path))
     errAbort("unable to locate chain file %s",path);
@@ -1350,11 +1355,11 @@
 ,path);
 verbose(1,"%s\n",cmd); system(cmd);
 
 safef(cmd,sizeof(cmd),
-"pslRecalcMatch unscoredNB.psl /cluster/data/%s/nib" 
+"pslRecalcMatch unscoredNB.psl %s" 
 " pslMap.fa nonBac.psl"
-,db);
+,dnaPath);
 verbose(1,"%s\n",cmd); system(cmd);
 
 /* bac */
 safef(cmd,sizeof(cmd),
@@ -1363,11 +1368,11 @@
 ,path);
 verbose(1,"%s\n",cmd); system(cmd);
 
 safef(cmd,sizeof(cmd),
-"pslRecalcMatch unscoredB.psl /cluster/data/%s/nib" 
+"pslRecalcMatch unscoredB.psl %s" 
 " pslMap.fa bacTemp.psl"
-,db);
+,dnaPath);
 verbose(1,"%s\n",cmd); system(cmd);
 
 safef(cmd,sizeof(cmd),
 "pslCDnaFilter -globalNearBest=0.00001 -minCover=0.05"