83dbcadd73270e8b652fb4b5537235ca5727c7fa hiram Mon Dec 8 16:22:38 2025 -0800 fix the toga click code to use a simple local hideToggle class refs #35776 diff --git src/hg/hgc/togaClick.c src/hg/hgc/togaClick.c index 123f3246292..f446ec6bb5b 100644 --- src/hg/hgc/togaClick.c +++ src/hg/hgc/togaClick.c @@ -323,178 +323,170 @@ char startBuf[16], endBuf[16]; bigBedIntervalToRow(bb, chrom, startBuf, endBuf, fields, bbi->fieldCount); break; } printf("

Projection v2 %s

\n", item); struct togaDataBB *info = togaDataBBLoad(&fields[11], bbi->fieldCount); // Bogdan: why 11? 0-11 are bed-like fields likely printf("Reference transcript: %s
", info->ref_link); printf("Genomic locus in reference: %s
\n", info->ref_region); printf("Genomic locus in query: %s
\n", info->query_region); printf("Projection classification: %s
\n", info->status); printf("Probability that query locus is orthologous: %s
\n", info->chain_score); // list of chain features (for orthology classification) -printf("Show features used for ortholog probability\n"); -printf("
\n"); -printf("

\n"); -printf("
\nFeature description:\n"); +printf("

\nFeature description:\n"); printf("For each projection (one reference transcript and one overlapping chain),\n"); printf("TOGA computes the following features by intersecting the reference coordinates of aligning\n"); printf("blocks in the chain with different gene parts (coding exons, UTR (untranslated region) exons, introns)\n"); -printf("and the respective intergenic regions.\n
\n"); +printf("and the respective intergenic regions.\n

\n"); -printf("We define the following variables:\n

\n"); +printf("

Using these variables, TOGA computes the following features:\n"); printf("

\n"); +printf("

\n"); -printf("\n
\n"); +printf("\n"); printf("
\n"); // show inact mut plot printf("

Visualization of inactivating mutations on exon-intron structure

\n"); printf("%s\n", info->svg_line); printf("
Exons shown in grey are missing (often overlap assembly gaps).\nExons shown in"); printf(" red or blue are deleted or do not align at all.\nRed indicates that the exon deletion "); printf("shifts the reading frame, while blue indicates that exon deletion(s) are framepreserving.
\n"); // GLP features -printf("Show features used for transcript classification\n"); -printf("
\n"); -printf("

\n
\n"); printf("
\n"); printf("

Predicted protein sequence

\n"); -printf("Show protein sequence of query\n"); -printf("
\n"); -// printf("{protein seq of the query without dashes or other things. Should end with *}\n"); -printf(""); +printf("Show protein sequence of query\n"); +printf("
\n"); +printf("\n

\n

\n"); if (info->protseqFrameCorrected != NULL) { - printf("Show frame-corrected protein sequence of query (potential frameshifts are masked)\n"); - printf("
\n"); - printf(""); + printf("Show frame-corrected protein sequence of query (potential frameshifts are masked)\n"); + printf("\n"); + printf("\n

\n
\n"); } if (info->CDSseq != NULL) { printf("
\n"); printf("

Predicted coding (DNA) sequence

\n"); - printf("Show coding sequence of query\n"); - printf("
\n"); - printf(""); + printf("Show coding sequence of query\n"); + printf("\n"); + printf("\n

\n
\n"); } // and show protein sequence printf("
\n"); printf("

Protein sequence alignment

\n"); -printf("Show alignment between reference and query\n"); -printf("
\n"); -printf("%s\n", info->prot_alignment); -printf("
\n"); +printf("Show alignment between reference and query\n"); +printf("\n"); // show inactivating mutations if required printf("
\n"); printf("

List of inactivating mutations

\n"); -printf("Show inactivating mutations\n"); -printf("
\n"); -printf("\n"); // init table +printf("Show inactivating mutations\n"); +printf("
\n"); // init table printf("\n"); printf("\n"); printf("%s\n", info->inact_mut_html_table); -printf("
Exon numberCodon numberMutation classMutationTreated as inactivatingMutation ID
\n"); +printf("

\n"); printf("
\n\n"); // show exons data printf("
\n"); printf("

Exon alignments

\n"); -printf("Show exon sequences and features\n"); -printf("
\n"); -// printf("%s\n", info->exon_ali_string); -printf("%s\n", info->exon_ali_html); +printf("Show exon sequences and features\n"); +printf("\n

\n"); -// TODO: check whether I need this -hPrintf(""); -hPrintf(""); -hPrintf(""); - - printTrackHtml(tdb); // and do I need this? } void doHillerLabTOGAGene(char *database, struct trackDb *tdb, char *item, char *table_name) /* Put up TOGA Gene track info. */ { //int start = cartInt(cart, "o"); char headerTitle[512]; char suffix[512]; strcpy(suffix, table_name); extractHLTOGAsuffix(suffix); safef(headerTitle, sizeof(headerTitle), "%s", item); genericHeader(tdb, headerTitle); printf("

TOGA gene annotation

\n"); @@ -531,40 +523,40 @@ sqlSafef(query, sizeof(query), "select * from %s where transcript='%s'", togaDataTableName, item); sr = sqlGetResult(conn, query); if ((row = sqlNextRow(sr)) != NULL) { info = togaDataLoad(row); // parse sql output // fill HTML template: printf("Reference transcript: %s
", info->ref_trans_id, info->ref_trans_id); printf("Genomic locus in reference: %s
\n", info->ref_region); printf("Genomic locus in query: %s
\n", info->query_region); printf("Projection classification: %s
\n", info->status); printf("Probability that query locus is orthologous: %s
\n", info->chain_score); // list of chain features (for orthology classification) - printf("Show features used for ortholog probability\n"); - printf("
\n"); - printf("
    \n"); + printf("Show features used for ortholog probability\n"); + printf("

\n"); printf("
\nFeature description:\n"); printf("For each projection (one reference transcript and one overlapping chain),\n"); printf("TOGA computes the following features by intersecting the reference coordinates of aligning\n"); printf("blocks in the chain with different gene parts (coding exons, UTR (untranslated region) exons, introns)\n"); printf("and the respective intergenic regions.\n
\n"); printf("We define the following variables:\n
    \n"); printf("
  • c: number of reference bases in the intersection between chain blocks and coding exons of the gene under consideration.
  • \n"); printf("
  • C: number of reference bases in the intersection between chain blocks and coding exons of all genes.
  • \n"); printf("
  • a: number of reference bases in the intersection between chain blocks and coding exons and introns of the gene under consideration.
  • \n"); printf("
  • A: number of reference bases in the intersection between chain blocks and coding exons and introns of all genes and the intersection\n"); printf("between chain blocks and intergenic regions (excludes UTRs).
  • \n"); printf("
  • f: number of reference bases in chain blocks overlapping the 10 kb flanks of the gene under consideration.\n"); printf("Alignment blocks overlapping exons of another gene that is located in these 10 kb flanks are ignored.
  • \n"); @@ -588,70 +580,70 @@ printf("
  • "local CDS coverage" as c / CDS, which is only used for single-exon genes.
  • \n"); printf("
\n"); printf("\n
\n
\n"); htmlHorizontalLine(); // show inact mut plot printf("

Visualization of inactivating mutations on exon-intron structure

\n"); printf("%s
\n", info->svg_line); printf("
Exons shown in grey are missing (often overlap assembly gaps).\nExons shown in"); printf(" red or blue are deleted or do not align at all.\nRed indicates that the exon deletion "); printf("shifts the reading frame, while blue indicates that exon deletion(s) are framepreserving.
\n"); // GLP features - printf("Show features used for transcript classification\n"); - printf("
\n"); - printf("
    \n"); + printf("Show features used for transcript classification\n"); + printf("\n
    \n"); + printf("

\n
\n
\n"); printf("

Query protein sequence


"); - printf("Show protein sequence of query\n"); - printf("
\n"); - printf("{protein seq of the query without dashes or other things. Should end with *}\n"); - printf("
\n
\n
\n"); + printf("Show protein sequence of query\n"); + printf("\n"); // and show protein sequence htmlHorizontalLine(); printf("

Protein sequence alignment


\n"); - printf("Show alignment between reference and query\n"); + printf("Show alignment between reference and query\n"); printf("
\n"); - printf("%s
\n", info->prot_alignment); + printf("

%s


\n", info->prot_alignment); printf("
\n

\n"); // do not forget to free toga data struct togaDataFree(&info); } else { // no data found, need to report this - printf("Not found data for %s\n", item); + printf("

No found data for %s

\n", item); } sqlFreeResult(&sr); } // show inactivating mutations if required printf("

List of inactivating mutations


\n"); if (hTableExists(database, togaInactMutTableName)) { char query[256]; struct sqlResult *sr = NULL; char **row; sqlSafef(query, sizeof(query), "select * from %s where transcript='%s'", togaInactMutTableName, item); sr = sqlGetResult(conn, query); printf("Show inactivating mutations\n");