e8499e560e60e115ca15069b9eadb36f01a7614d markd Sat Apr 13 09:45:15 2024 -0700 delete dead links for MGC/ORFeome diff --git src/hg/hgc/mgcClick.c src/hg/hgc/mgcClick.c index 14db3b2..b017776 100644 --- src/hg/hgc/mgcClick.c +++ src/hg/hgc/mgcClick.c @@ -92,111 +92,74 @@ return mgcDb; } char *mgcDbName() /* get just the MGC collection name for the current ucsc database */ { return getMgcDb().name; } void printMgcHomeUrl(struct mgcDb *mgcDb) /* print out an URL to link to the MGC site */ { printf("http://%s.nci.nih.gov/", mgcDb->server); } -void printMgcUrl(int imageId) -/* print out an URL to link to the MGC site for a full-length MGC clone */ -{ -struct mgcDb mgcDb = getMgcDb(); -printf("http://%s.nci.nih.gov/Reagents/CloneInfo?ORG=%s&IMAGE=%d", - mgcDb.server, mgcDb.organism, imageId); -} - static void printOrderUrl(int gi) /* print out an URL to link to the NCBI order CGI for a full-length MGC clone */ { printf("https://www.ncbi.nlm.nih.gov/genome/clone/orderclone.cgi?db=nucleotide&uid=%d", gi); } -static void printImageUrl(int imageId) -/* print out an URL to link to IMAGE database for a clone */ -{ -printf("http://www.imageconsortium.org/IQ/bin/singleCloneQuery?clone_id=%d", imageId); -} - void printMgcDetailsUrl(char *acc, int start) /* print out an URL to link to MGC details pages from another details page in * the browser.*/ { // pass zero coordiates for window to indicate this isn't a browser click printf("../cgi-bin/hgc?%s&g=mgcGenes&o=%d&i=%s&l=0&r=0&db=%s", cartSidUrlString(cart), start, acc, database); } -static void printMBLabValidDbUrl(char *acc) -/* print out an URL to link to Brent lab validation database */ -{ -printf("http://mblab.wustl.edu/cgi-bin/mgc.cgi?acc=%s&action=cloneRpt&alignment=Submit", acc); -} - struct cloneInfo /* Information on a MGC or ORFeome clone collected from various tables */ { boolean isMgc; // is this MGC or ORFeome char *acc; int start; char *pslTbl; // psl-format table char *gpTbl; // genePred format table char *desc; // genbank info char *organism; char *tissue; char *library; char *development; char *geneName; char *productName; char *moddate; char *clone; char *cds; char *keyword; int version; int imageId; int mgcId; int gi; char *refSeqAccv; // best RefSeq acc.version, or NULL char *refSeqSum; // RefSeq from best matching RefSeq with summary, or NULL. char *refSeqSumAccv; // accv for summary, maybe different than best match struct geneSimilarities *refSeqs; // most similar RefSeqs, with name set to acc.version }; -static boolean isInMBLabValidDb(char *acc) -/* check if an accession is in the Brent lab validation database */ -{ -boolean inMBLabValidDb = FALSE; -struct sqlConnection *fconn = sqlMayConnect("hgFixed"); -if ((fconn != NULL) && sqlTableExists(fconn, "mgcMBLabValid")) - { - char query[64], buf[32]; - sqlSafef(query, sizeof(query), "select acc from mgcMBLabValid where acc=\"%s\"", - acc); - if (sqlQuickQuery(fconn, query, buf, sizeof(buf)) != NULL) - inMBLabValidDb = TRUE; - sqlDisconnect(&fconn); - } -return inMBLabValidDb; -} - static void cdnaInfoLoad(struct cloneInfo *ci, struct sqlConnection *conn) /* Loading clone information from gbCdnaInfoTable relational tables. */ { // data from gbCdnaInfoTable and friends char query[1024]; sqlSafef(query, sizeof(query), "select " "des.name, o.name, t.name, l.name," "dev.name, gene.name, p.name, m.name," "c.name,k.name,g.moddate,g.version," "g.gi" " from " "%s g,%s des,%s o,%s t,%s l,%s dev," "%s gene,%s p,%s m,%s c,%s k" " where " @@ -597,41 +560,30 @@ printf("Click here for details", hgcPathAndSettings(), track, seqName, winStart, winEnd); } static void prOrderLink(char *name, struct cloneInfo *ci) /* create link to NCBI clone order CGI */ { webPrintLinkTableNewRow(); webPrintLinkCellStart(); printf("gi); printf("\" TARGET=_blank>Order %s clone", name); webPrintLinkCellEnd(); } -static void prImageLink(struct cloneInfo *ci) -/* create link to IMAGE database */ -{ -webPrintLinkTableNewRow(); -webPrintLinkCellStart(); -printf("imageId); -printf("\" TARGET=_blank>IMAGE clone %d", ci->imageId); -webPrintLinkCellEnd(); -} - static void prGenbankLink(struct cloneInfo *ci) /* create link to Genbank database */ { webPrintLinkTableNewRow(); webPrintLinkCellStart(); printf("acc); printf("\" TARGET=_blank>Genbank %s", ci->acc); webPrintLinkCellEnd(); } static void prRefSeqLinks(struct cloneInfo *ci) /* print link to RefSeq */ { webPrintLinkTableNewRow(); @@ -677,57 +629,38 @@ printf("UCSC Gene %s", cartSidUrlString(cart), database, gene->name, seqName, gene->txStart, gene->txEnd, gene->name); webPrintLinkCellEnd(); } geneSimilaritiesFree(&ucscGenes); } static void prMgcCloneLinks(struct sqlConnection *conn, struct mgcDb *mgcDb, struct cloneInfo *ci) /* print table of clone links */ { webPrintLinkTableStart(); webPrintLabelCell("Links"); if (ci->gi > 0) prOrderLink(mgcDb->name, ci); -// link to MGC database -webPrintLinkTableNewRow(); -webPrintLinkCellStart(); -printf("imageId); -printf("\" TARGET=_blank>%s clone database", mgcDb->name); -webPrintLinkCellEnd(); - -prImageLink(ci); prGenbankLink(ci); if (ci->refSeqAccv != NULL) prRefSeqLinks(ci); if (sqlTableExists(conn, "ccdsGene")) prCcdsLinks(conn, ci); if (sqlTableExists(conn, "knownGene")) prUcscGenesLinks(conn, ci); -// Brent lab validation database -if (isInMBLabValidDb(ci->acc)) - { - webPrintLinkTableNewRow(); - webPrintLinkCellStart(); - printf("acc); - printf("\" TARGET=_blank>Brent Lab Clone Validation"); - webPrintLinkCellEnd(); - } webPrintLinkTableEnd(); } static void prMgcInfoLinks(struct sqlConnection *conn, char *acc, struct mgcDb *mgcDb, struct cloneInfo *ci) /* print clone info and links */ { webNewSection("%s Clone Information and Links", mgcDb->name); printf("
\n"); prCloneInfo(ci); printf("\n"); prMgcCloneLinks(conn, mgcDb, ci); printf("
\n"); } @@ -803,32 +736,30 @@ static void prOrfeomeCloneLinks(struct sqlConnection *conn, char *acc, struct cloneInfo *ci) /* print table of clone links */ { webPrintLinkTableStart(); webPrintLabelCell("Links"); webPrintLinkTableNewRow(); if (ci->gi > 0) prOrderLink("ORFeome", ci); #if 0 // link to ORFeome database // FIXME: this doesn't appear to work, need to ask Christa // http://www.orfeomecollaboration.org/bin/cloneStatus.pl #endif -if (ci->imageId > 0) - prImageLink(ci); prGenbankLink(ci); if (ci->refSeqAccv != NULL) prRefSeqLinks(ci); if (sqlTableExists(conn, "ccdsGene")) prCcdsLinks(conn, ci); if (sqlTableExists(conn, "knownGene")) prUcscGenesLinks(conn, ci); webPrintLinkTableEnd(); } static void prOrfeomeInfoLinks(struct sqlConnection *conn, char *acc, struct cloneInfo *ci) /* print clone info and links */ { webNewSection("ORFeome Clone Information and Links");