#! /bin/tcsh echo "Content-Type:text/html" echo echo "" echo "
" set srvr = "genome.ucsc.edu" if ( $?QUERY_STRING == 0 ) then set QUERY_STRING = "srvr=genome.ucsc.edu" endif if ( "$QUERY_STRING" == "" ) then set QUERY_STRING = "srvr=genome.ucsc.edu" endif # Split the field=value pair on the '='. set pair=`echo $QUERY_STRING | sed 's/=/\t/'` # The first part of the pair is the name. set varname=`echo ${pair} | awk '{print $1}'` # The second part of the pair is the srvr name. set varval=`echo ${pair} | awk '{print $2}'` if ("$varname" == "srvr") then set srvr = "$varval" endif #echo "dbg: pair = $pairhgw: " # display without a link if that's the page you are on. foreach machine ( dev beta genome 1 2 3 4 5 6 7 8 ) echo $srvr | grep $machine > /dev/null if ( $status ) then if ( $machine == RR || $machine == genome) then set node=genome set machine=RR else set node=hgw${machine}.cse endif echo '' endif echo $machine | sed "s/genome/RR/" echo " " end echo " " echo "" set line=`grep "pq.user" hg.conf` set pair=`echo $line| sed 's/=/\t/'` set user=`echo ${pair} | awk '{print $2}'` set line=`grep "pq.password" hg.conf` set pair=`echo $line| sed 's/=/\t/'` set pwd=`echo ${pair} | awk '{print $2}'` set junkPath = "../trash/gbjunk" # normal cgi use #set junkPath = "./gbjunk" # use when running from commandline set recentDb = "hg17" set sql = 'select name, label, "." from grp ' set sql = "$sql"'where name not like "user" and name not like "encode" and name not like "x" ' set sql = "$sql"'order by priority;' #echo "$sql
" echo "Track" echo " | " foreach db ( $dblist ) echo "" echo "$db" echo " | " end while ( $trkdone < $trkcount ) set sql = 'select distinct shortLabel, ".", tableName from gbjunk ' set sql = "$sql"'where grp="'"$grpname[$g]"'" ' set sql = "$sql"'order by shortLabel ' set sql = "$sql"'limit '"$trkdone"', '"$trkchunk" #echo "$sql
---|---|
" set shortLabel = "" set sep = "" while ("$trklist[1]" != ".") #echo "$trklist[1] " set shortLabel = "$shortLabel$sep$trklist[1]" shift trklist set sep = " " end shift trklist echo "$shortLabel" echo " | " #get table too for yes links set table = "$trklist[1]" shift trklist #-------DB COLUMNS LOOP----------- set sql = 'select db from gbjunk ' set sql = "$sql"'where grp="'"$grpname[$g]"'" ' set sql = "$sql"'and shortLabel="'"$shortLabel"'" ' set sql = "$sql"'order by db;' #echo "$sql" #echo "$db" set found = "0" foreach dl ( $datalist ) if ("$dl" == "$db") then set found = "1" endif end if ( "$found" == "1" ) then set link = 'yes' echo "$link" else echo "no" endif echo " | " end #--------------------------------- echo "