c165c9929e94e05d593787e18cf574eb4623607c angie Mon Dec 9 09:44:46 2013 -0800 Revert "Added a couple ENCODE Regulation summary tracks to hgVai. refs #11461"This reverts commit c65b04d176ad125c1eddd777fb8befd481bdba2c. I decided that hgVai's support for regulatory tracks is not sufficient to roll out to the RR because annoFormatVep isn't yet smart enough to add regulatory consequence SO term (regulatory_region_variant) when one or more of these overlap. Also, there really should be some filtering - I suspect the false positive rate will be too high otherwise because the Tfbs cover 1/8th of the genome. The next release to the RR is not until Jan. 21, more than a month from now. I'll bring this back after the v293 build is tagged. refs #11461 diff --git src/hg/hgVai/hgVai.c src/hg/hgVai/hgVai.c index 0f6297b..0c2abdc 100644 --- src/hg/hgVai/hgVai.c +++ src/hg/hgVai/hgVai.c @@ -586,113 +586,105 @@ } void selectDbSnp(boolean gotSnp) /* Offer to include rsID (and other fields, or leave that for advanced output??) if available */ { if (!gotSnp) return; startCollapsibleSection("dbSnp", "Known variation", TRUE); cartMakeCheckBox(cart, "hgva_rsId", TRUE); printf("Include dbSNP " "rs# ID if one exists
\n"); puts("
"); endCollapsibleSection(); } -boolean isRegulatoryTrack(struct trackDb *tdb, void *filterData) -/* For now, just look for a couple specific tracks by tableName. */ -{ -//#*** NEED METADATA -return (sameString("wgEncodeRegDnaseClusteredV2", tdb->table) || - sameString("wgEncodeRegTfbsClusteredV3", tdb->table)); -} - -struct slRef *findRegulatoryTracks() -/* Look for the very limited set of Regulation tracks that hgVai offers. */ -{ -struct slRef *regTrackRefList = NULL; -tdbFilterGroupTrack(fullTrackList, fullGroupList, isRegulatoryTrack, - NULL, NULL, ®TrackRefList); -return regTrackRefList; -} - boolean isConsElTrack(struct trackDb *tdb, void *filterData) /* This is a TdbFilterFunction to get "phastConsNwayElements" tracks. */ { return (startsWith("phastCons", tdb->table) && stringIn("Elements", tdb->table)); } boolean isConsScoreTrack(struct trackDb *tdb, void *filterData) /* This is a TdbFilterFunction to get tracks that start with "phastCons" (no Elements) * or "phyloP". */ { return ((startsWith("phastCons", tdb->table) && !stringIn("Elements", tdb->table)) || startsWith("phyloP", tdb->table)); } void findCons(struct slRef **retElTrackRefList, struct slRef **retScoreTrackRefList) /* See if this database has Conserved Elements and/or Conservation Scores */ { tdbFilterGroupTrack(fullTrackList, fullGroupList, isConsElTrack, NULL, NULL, retElTrackRefList); tdbFilterGroupTrack(fullTrackList, fullGroupList, isConsScoreTrack, NULL, NULL, retScoreTrackRefList); } -void trackCheckBoxSection(char *sectionSuffix, char *title, struct slRef *trackRefList) -/* If trackRefList is non-NULL, make a collapsible section with a checkbox for each track, - * labelled with longLabel. */ +void trackRefListToCheckboxes(struct slRef *trackRefList) { -if (trackRefList != NULL) - { - startCollapsibleSection(sectionSuffix, title, FALSE); struct slRef *ref; for (ref = trackRefList; ref != NULL; ref = ref->next) { struct trackDb *tdb = ref->val; char cartVar[512]; safef(cartVar, sizeof(cartVar), "hgva_track_%s_%s", database, tdb->track); cartMakeCheckBox(cart, cartVar, FALSE); struct trackDb *topTdb = trackDbTopLevelSelfOrParent(tdb); printf("%s
\n", hgTrackUiName(), cartSidUrlString(cart), topTdb->track, tdb->longLabel); } +} + +void selectCons(struct slRef *elTrackRefList, struct slRef *scoreTrackRefList) +/* Offer checkboxes for optional Conservation scores. */ +{ +if (elTrackRefList == NULL && scoreTrackRefList == NULL) + return; +if (elTrackRefList != NULL) + { + startCollapsibleSection("ConsEl", "Conserved elements", FALSE); + trackRefListToCheckboxes(elTrackRefList); puts("
"); endCollapsibleSection(); } +if (scoreTrackRefList != NULL) + { + startCollapsibleSection("ConsScore", "Conservation scores", + FALSE); + trackRefListToCheckboxes(scoreTrackRefList); + endCollapsibleSection(); + } } void selectAnnotations() /* Beyond predictions of protein-coding effect, what other basic data can we integrate? */ { struct slName *dbNsfpTables = findDbNsfpTables(); boolean gotSnp = findSnpBed4("", NULL, NULL); -struct slRef *regTrackRefList = findRegulatoryTracks(); struct slRef *elTrackRefList = NULL, *scoreTrackRefList = NULL; findCons(&elTrackRefList, &scoreTrackRefList); -if (dbNsfpTables == NULL && !gotSnp && elTrackRefList == NULL && scoreTrackRefList == NULL - && regTrackRefList == NULL) +if (dbNsfpTables == NULL && !gotSnp && elTrackRefList == NULL && scoreTrackRefList == NULL) return; puts("
"); printf("
Select More Annotations (optional)
\n"); // Make wrapper table for collapsible sections: puts(""); selectDbNsfp(dbNsfpTables); selectDbSnp(gotSnp); -trackCheckBoxSection("Regulation", "Regulatory Regions", regTrackRefList); -trackCheckBoxSection("ConsEl", "Conserved elements", elTrackRefList); -trackCheckBoxSection("ConsScore", "Conservation scores", scoreTrackRefList); +selectCons(elTrackRefList, scoreTrackRefList); puts("
"); } void selectFiltersFunc() /* Options to restrict variants based on gene region/soTerm from gpFx */ { startCollapsibleSection("filtersFunc", "Functional role", FALSE); printf("Include variants annotated as
\n"); cartMakeCheckBox(cart, "hgva_include_intergenic", TRUE); printf("intergenic
\n"); cartMakeCheckBox(cart, "hgva_include_upDownstream", TRUE); printf("upstream/downstream of gene
\n"); cartMakeCheckBox(cart, "hgva_include_nmdTranscript", TRUE); printf("in transcript already subject to nonsense-mediated decay (NMD)
\n"); cartMakeCheckBox(cart, "hgva_include_exonLoss", TRUE);