d409d8e8e6c09a6a668752d9d811c95da0873dc5 max Mon Nov 13 23:07:24 2023 -0800 adding info bubbles to hgLiftOver, refs #32011 diff --git src/hg/hgLiftOver/hgLiftOver.c src/hg/hgLiftOver/hgLiftOver.c index 9c70358..f27790d 100644 --- src/hg/hgLiftOver/hgLiftOver.c +++ src/hg/hgLiftOver/hgLiftOver.c @@ -62,32 +62,32 @@ { char chainS[64]; safef(chainS, sizeof(chainS), "%s.%s", chain->fromDb, chain->toDb); return cloneString(chainS); } void webMain(struct liftOverChain *chain, boolean multiple, boolean keepSettings, int minSizeQ, int minChainT, float minBlocks, float minMatch, boolean fudgeThick) /* set up page for entering data */ { struct dbDb *dbList; char *fromOrg = hOrganism(chain->fromDb), *toOrg = hOrganism(chain->toDb); char *chainString = chainStringVal(chain); cgiParagraph( "This tool converts genome coordinates and annotation files " - "between assemblies.  " - "The input data can be entered into the text box or uploaded as a file.  " + "from the original to the new assembly using an alignment.  " + "The input regions can be entered into the text box or uploaded as a file.  " "For files over 500Mb, use the command-line tool described in our " "LiftOver documentation." "  If a pair of assemblies cannot be selected from the pull-down menus," " a sequential lift may still be possible (e.g., mm9 to mm10 to mm39).  " "If your desired conversion is still not available, please " "contact us." ""); /* create HMTL form */ puts("
\n"); cartSaveSession(cart); /* create HTML table for layout purposes */ puts("\n\n"); @@ -117,91 +117,105 @@ /* to assembly */ cgiSimpleTableFieldStart(); dbDbFreeList(&dbList); dbList = hGetLiftOverToDatabases(chain->fromDb); printLiftOverGenomeList(HGLFT_TOORG_VAR, chain->toDb, dbList, "change", onChange); cgiTableFieldEnd(); cgiSimpleTableFieldStart(); printAllAssemblyListHtmlParm(chain->toDb, dbList, HGLFT_TODB_VAR, TRUE, NULL, NULL); cgiTableFieldEnd(); cgiTableRowEnd(); cgiTableEnd(); -cgiParagraph(" "); +printf("
"); cgiSimpleTableStart(); cgiSimpleTableRowStart(); cgiTableField("Minimum ratio of bases that must remap:"); cgiSimpleTableFieldStart(); cgiMakeDoubleVar(HGLFT_MINMATCH, (keepSettings) ? minMatch : chain->minMatch,6); +puts(" "); +printInfoIcon("The minimum ratio of basepairs of the input region covered by an alignment. Regions scoring lower than this will not be lifted at all."); cgiTableFieldEnd(); cgiTableRowEnd(); cgiSimpleTableRowStart(); -cgiTableField(" "); cgiTableRowEnd(); + cgiSimpleTableRowStart(); -cgiTableField("BED 4 to BED 6 Options"); +cgiTableField("Regions defined by chrom:start-end (BED 4 to BED 6)"); cgiTableRowEnd(); cgiSimpleTableRowStart(); cgiTableField("Allow multiple output regions:"); cgiSimpleTableFieldStart(); cgiMakeCheckBox(HGLFT_MULTIPLE,multiple); +puts(" "); +printInfoIcon("By default, input regions that map to multiple regions will not be lifted at all. When this option is checked, all targets are output."); cgiTableFieldEnd(); cgiTableRowEnd(); cgiSimpleTableRowStart(); cgiTableField("  Minimum hit size in query:"); cgiSimpleTableFieldStart(); cgiMakeIntVar(HGLFT_MINSIZEQ,(keepSettings) ? minSizeQ : chain->minSizeQ,4); +puts(" "); +printInfoIcon("In multiple output mode, repeated regions within longer input regions can lead to artefacts. The 'hit size' filter allows to keep only targets with a certain length."); cgiTableFieldEnd(); cgiTableRowEnd(); cgiSimpleTableRowStart(); cgiTableField("  Minimum chain size in target:"); cgiSimpleTableFieldStart(); cgiMakeIntVar(HGLFT_MINCHAINT,(keepSettings) ? minChainT : chain->minChainT,4); +puts(" "); +printInfoIcon("In multiple output mode, keeps only targets lifted through alignments of a certain length. At higher phylogenetic distances (e.g. human/mouse), the filters can be useful to keep all copies of the input regions but remove dozens of new small targets introduced by a repeat/transposon within a longer input region."); cgiTableFieldEnd(); cgiTableRowEnd(); cgiSimpleTableRowStart(); -cgiTableField(" "); cgiTableRowEnd(); cgiSimpleTableRowStart(); -cgiTableField("BED 12 Options"); +cgiTableField("Regions with an exon-intron structure (usually transcripts, BED 12)"); cgiTableRowEnd(); cgiSimpleTableRowStart(); -cgiTableField("Min ratio of alignment blocks or exons that must map:"); +cgiTableField("Minimum ratio of alignment blocks or exons that must map:"); cgiSimpleTableFieldStart(); cgiMakeDoubleVar(HGLFT_MINBLOCKS,(keepSettings) ? minBlocks : chain->minBlocks,6); +puts(" "); +printInfoIcon("The minimum ratio of the number of exons (not their bases) covered by the alignment. Transcripts lower than this will not be output at all. If an exon (range thickStart-thickEnd) is not alignable at all, it will be skipped or, if the option below is checked, lifted it to the closest alignable base."); cgiTableFieldEnd(); cgiTableRowEnd(); cgiSimpleTableRowStart(); -cgiTableField("If thickStart/thickEnd is not mapped, use the closest mapped base:"); +cgiTableField("If exon is not mapped, use the closest mapped base:"); cgiSimpleTableFieldStart(); cgiMakeCheckBox(HGLFT_FUDGETHICK,(keepSettings) ? fudgeThick : (chain->fudgeThick[0]=='Y')); +puts(" "); +printInfoIcon("If checked, exons that are not covered by an alignment will be lifted to the closest alignable base."); cgiTableFieldEnd(); cgiTableRowEnd(); +cgiSimpleTableRowStart(); +cgiTableRowEnd(); + cgiTableEnd(); /* text box and two buttons (submit, reset) */ puts("

Paste in data below, one position per line. You can use the " "BED format (e.g. \"chr4 100000 100001\", " "0-based) or the format of the position box (\"chr4:100,001-100,001\", 1-based). " "See the documentation.\n" "We do not recommend liftOver for SNPs that have rsIDs. See our " "FAQ for more information.

\n"); cgiSimpleTableStart(); cgiSimpleTableRowStart(); cgiSimpleTableFieldStart(); cgiMakeTextArea(HGLFT_USERDATA_VAR, cartCgiUsualString(cart, HGLFT_USERDATA_VAR, NULL), 10, 80); @@ -242,31 +256,31 @@ HGLFT_REFRESHONLY_VAR); printf("\n", HGLFT_LAST_CHAIN, chainString); cartSaveSession(cart); puts(""); freeMem(fromOrg); freeMem(toOrg); } void webParamsUsed(float minMatch, boolean multiple, int minSizeQ, int minChainT, float minBlocks, boolean fudgeThick) { webNewSection("Parameters Used"); cgiSimpleTableStart(); cgiSimpleTableRowStart(); -cgiTableField("Minimum ratio of bases that must remap:"); +cgiTableField("Minimum ratio of bases that must map:"); cgiSimpleTableFieldStart(); printf("%.2f",minMatch); cgiTableFieldEnd(); cgiTableRowEnd(); cgiSimpleTableRowStart(); cgiTableField(" "); cgiTableRowEnd(); cgiSimpleTableRowStart(); cgiTableField("BED 4 to BED 6 Options"); cgiTableRowEnd(); cgiSimpleTableRowStart(); cgiTableField("Allow multiple output regions:");