20bbccc6290369e739ad5f0b0fe877c776f50d42 kent Wed Feb 7 13:52:36 2024 -0800 Removing some unused facets. Changing CIRM to SSPsyGene a few places. diff --git src/hg/cirm/cdw/cdwWebBrowse/cdwWebBrowse.c src/hg/cirm/cdw/cdwWebBrowse/cdwWebBrowse.c index 5d0249a..fc4ca8d 100644 --- src/hg/cirm/cdw/cdwWebBrowse/cdwWebBrowse.c +++ src/hg/cirm/cdw/cdwWebBrowse/cdwWebBrowse.c @@ -57,31 +57,31 @@ /* Print out keys in hash alphabetically. */ { struct hashEl *list, *el; list = hashElListHash(hash); slSort(&list, hashElCmp); printf("%s:\n", label); for (el = list; el != NULL; el = el->next) printf(" %s\n", el->name); hashElFreeList(&list); } // fields/columns of the browse file table char *fileTableFields = NULL; char *visibleFacetFields = NULL; #define FILEFIELDS "file_name,file_size,ucsc_db" -#define FILEFACETFIELDS "species,assay,format,output,organ_anatomical_name,lab,data_set_id,biosample_cell_type,sample_label" +#define FILEFACETFIELDS "species,assay,format,lab,data_set_id" struct dyString *printPopularTags(struct hash *hash, int maxSize) /* Get all hash elements, sorted by count, and print all the ones that fit */ { maxSize -= 3; // Leave room for ... struct dyString *dy = dyStringNew(0); struct hashEl *hel, *helList = hashElListHash(hash); slSort(&helList, hashElCmpIntValDesc); for (hel = helList; hel != NULL; hel = hel->next) { int oldSize = dy->stringSize; if (oldSize != 0) dyStringAppend(dy, ", "); dyStringPrintf(dy, "%s (%d)", hel->name, ptToInt(hel->val)); @@ -2009,59 +2009,62 @@ while (fgets(buf, 1000, fh) != NULL) puts(buf); } char *tagPopularityFields[] = { "tag name", "vals", "popular values (files)...", "files",}; void doHome(struct sqlConnection *conn) /* Put up home/summary page */ { printf("
"); printf("\n", 200, 275); printf(""); /* Print sentence with summary of bytes, files, and labs */ char query[256]; -printf("The CIRM Stem Cell Hub contains "); +printf("The SSPsyGene Staging Portal contains "); sqlSafef(query, sizeof(query), "select sum(size) from cdwFile,cdwValidFile where cdwFile.id=cdwValidFile.id " " and (errorMessage = '' or errorMessage is null)" ); long long totalBytes = sqlQuickLongLong(conn, query); printWithGreekByte(stdout, totalBytes); printf(" of data in "); #ifdef OLD sqlSafef(query, sizeof(query), "select count(*) from cdwFile,cdwValidFile where cdwFile.id=cdwValidFile.fileId " " and (errorMessage = '' or errorMessage is null)" ); #endif /* OLD */ /* Using a query that is faster than the table join but gives the same result * (0.2 sec vs. 0.8 sec) */ sqlSafef(query, sizeof(query), "select count(*) from cdwFile where (errorMessage = '' || errorMessage is null)" " and cdwFileName like '%%/%s%%'", cdwLicensePlateHead(conn) ); long long fileCount = sqlQuickLongLong(conn, query); printLongWithCommas(stdout, fileCount); printf(" files"); sqlSafef(query, sizeof(query), "select count(*) from cdwLab " ); +#ifdef OLD long long labCount = sqlQuickLongLong(conn, query); printf(" from %llu labs.
\n", labCount); +#endif /* OLD */ +printf(".
\n"); printf("Try using the browse menu on files or tracks. "); printf("The query link allows simple SQL-like queries of the metadata."); printf("
\n"); /* Print out some pie charts on important fields */ static char *pieTags[] = {"lab", "format", "assay", }; struct facetField *pieFacetList = facetFieldsFromSqlTable(conn, getCdwTableSetting("cdwFileFacets"), pieTags, ArraySize(pieTags), "N/A", NULL, NULL, NULL); struct facetField *ff; int i; printf("\n"); for (i=0, ff = pieFacetList; inext) @@ -2290,31 +2293,31 @@ printBodyTag(stdout); } puts(cdwPageHeader(cart, FALSE)); printf("
\n"); puts(cdwLocalMenuBar(cart, FALSE)); // Menu bar after tables open but before first section webPushErrHandlers(); // Now can do improved error handler } void localWebWrap(struct cart *theCart) /* We got the http stuff handled, and a cart. Now wrap a web page around it. */ { cart = theCart; -localWebStartWrapper("CIRM Stem Cell Hub Data Browser v0.62"); +localWebStartWrapper("SSPsyGene Staging Portal Data Browser v0.62"); pushWarnHandler(htmlVaWarn); doMiddle(); jsInlineFinish(); printf("
\n"); puts(cdwPageFooter(cart, FALSE)); printf("\n"); } void initFields() /* initialize fields */ { visibleFacetFields = getCdwSetting("cdwFacetFields", FILEFACETFIELDS); char temp[1024]; safef(temp, sizeof temp, "%s,%s", FILEFIELDS, visibleFacetFields); fileTableFields = cloneString(temp);