2ab031187ac37e8f7b16de41a771e6852c4f7030 markd Tue Sep 27 19:39:06 2016 -0700 fixed cases were cgi encoding was done at higher levels and hence double encode in my previous change. diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index a1a1713..77da76f 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -6505,52 +6505,51 @@ puts("
Go to the browser view of the %s
\n",
hgTracksPathAndSettings(), otherDb, otherOrg);
printTrackHtml(tdb);
-freez(&cgiItem);
}
/* Multipurpose function to show alignments in details pages where applicable
Show the URL from trackDb as well.
Only used for the Chimp tracks right now. */
void longXenoPsl1Chimp(struct trackDb *tdb, char *item,
char *otherOrg, char *otherChromTable, char *otherDb)
/* Put up cross-species alignment when the second species
* sequence is in a nib file. */
{
struct psl *psl = NULL;
char otherString[256];
char *cgiItem = cgiEncode(item);
char *thisOrg = hOrganism(database);
@@ -13733,63 +13728,61 @@
tdb->table, otherOrg, otherChromTable, otherDb);
printCustomUrl(tdb, item, TRUE);
printTrackHtml(tdb);
freez(&cgiItem);
}
void longXenoPsl1zoo2(struct trackDb *tdb, char *item,
char *otherOrg, char *otherChromTable)
/* Put up cross-species alignment when the second species
* sequence is in a nib file. */
{
struct psl *psl = NULL;
char otherString[256];
char anotherString[256];
-char *cgiItem = cgiEncode(item);
char *thisOrg = hOrganism(database);
cartWebStart(cart, database, "%s", tdb->longLabel);
psl = loadPslFromRangePair(tdb->table, item);
printf("%s position: %s:%d-%d
\n", otherOrg,
psl->qName, psl->qStart+1, psl->qEnd);
printf("%s size: %d
\n", otherOrg, psl->qEnd - psl->qStart);
printf("%s position: %s:%d-%d
\n", thisOrg,
psl->tName, psl->tStart+1, psl->tEnd);
printf("%s size: %d
\n", thisOrg,
psl->tEnd - psl->tStart);
printf("Identical Bases: %d
\n", psl->match + psl->repMatch);
printf("Number of Gapless Aligning Blocks: %d
\n", psl->blockCount );
printf("Strand: %s
\n",psl->strand);
printf("Percent identity within gapless aligning blocks: %3.1f%%
\n", 0.1*(1000 - pslCalcMilliBad(psl, FALSE)));
printf("Browser window position: %s:%d-%d
\n", seqName, winStart, winEnd);
printf("Browser window size: %d
\n", winEnd - winStart);
safef(anotherString, sizeof anotherString, "%s",otherOrg);
toUpperN(anotherString,1);
printf("Link to %s database
\n",
anotherString, psl->qStart, psl->qEnd, otherOrg);
safef(otherString, sizeof otherString, "%d&pslTable=%s&otherOrg=%s&otherChromTable=%s", psl->tStart,
tdb->table, otherOrg, otherChromTable);
if (pslTrimToTargetRange(psl, winStart, winEnd) != NULL)
{
- hgcAnchorSomewhere("htcLongXenoPsl2", cgiItem, otherString, psl->tName);
+ hgcAnchorSomewhere("htcLongXenoPsl2", item, otherString, psl->tName);
printf("
View details of parts of alignment within browser window.
\n");
}
printTrackHtml(tdb);
-freez(&cgiItem);
}
void doAlignmentOtherDb(struct trackDb *tdb, char *item)
/* Put up cross-species alignment when the second species
* is another db, indicated by the 3rd word of tdb->type. */
{
char *otherOrg;
char *otherDb;
char *words[8];
char *typeLine = cloneString(tdb->type);
int wordCount = chopLine(typeLine, words);
if (wordCount < 3 || !(sameString(words[0], "psl") && sameString(words[1], "xeno")))
errAbort("doAlignmentOtherDb: trackDb type must be \"psl xeno XXX\" where XXX is the name of the other database.");
otherDb = words[2];
otherOrg = hOrganism(otherDb);
@@ -20713,40 +20706,38 @@
struct lineFile *openExtLineFile(unsigned int extFileId)
/* Open line file corresponding to id in extFile table. */
{
char *path = hExtFileName(database, "extFile", extFileId);
struct lineFile *lf = lineFileOpen(path, TRUE);
freeMem(path);
return lf;
}
void printSampleWindow( struct psl *thisPsl, int thisWinStart, int
thisWinEnd, char *winStr, char *otherOrg, char *otherDb,
char *pslTableName )
{
char otherString[256];
char pslItem[1024];
-char *cgiPslItem;
safef(pslItem, sizeof pslItem, "%s:%d-%d %s:%d-%d",
thisPsl->qName, thisPsl->qStart, thisPsl->qEnd, thisPsl->tName, thisPsl->tStart, thisPsl->tEnd );
-cgiPslItem = cgiEncode(pslItem);
safef(otherString, sizeof otherString, "%d&pslTable=%s&otherOrg=%s&otherChromTable=%s&otherDb=%s", thisPsl->tStart,
pslTableName, otherOrg, "chromInfo" , otherDb );
if (pslTrimToTargetRange(thisPsl, thisWinStart, thisWinEnd) != NULL)
{
- hgcAnchorWindow("htcLongXenoPsl2", cgiPslItem, thisWinStart,
+ hgcAnchorWindow("htcLongXenoPsl2", pslItem, thisWinStart,
thisWinEnd, otherString, thisPsl->tName);
printf("%s\n", winStr );
}
}
void firstAndLastPosition( int *thisStart, int *thisEnd, struct psl *thisPsl )
/*return the first and last base of a psl record (not just chromStart
* and chromEnd but the actual blocks.*/
{
*thisStart = thisPsl->tStarts[0];
*thisEnd = thisPsl->tStarts[thisPsl->blockCount - 1];
if( thisPsl->strand[1] == '-' )
{
*thisStart = thisPsl->tSize - *thisStart;