From a7e023cca69da8c27e18cc988b70bea1a06d6a9e Mon Sep 17 00:00:00 2001 From: e-sollier Date: Tue, 5 Nov 2024 10:53:48 +0100 Subject: [PATCH] Add tooltips for the GUI --- figeno/gui/src/Basemod.jsx | 6 +- figeno/gui/src/Track.jsx | 206 ++++++++++++++++++------------------- 2 files changed, 106 insertions(+), 106 deletions(-) diff --git a/figeno/gui/src/Basemod.jsx b/figeno/gui/src/Basemod.jsx index 99b6c63..67cd5fa 100644 --- a/figeno/gui/src/Basemod.jsx +++ b/figeno/gui/src/Basemod.jsx @@ -209,7 +209,7 @@ export function BasemodfreqTrack({track,set_value,openColorPanel, setFileDialogD
- + set_value("smooth",e.target.value)}/>
- + set_value("gap_frac",e.target.value)}/>
diff --git a/figeno/gui/src/Track.jsx b/figeno/gui/src/Track.jsx index fdffcda..4e07693 100644 --- a/figeno/gui/src/Track.jsx +++ b/figeno/gui/src/Track.jsx @@ -65,31 +65,31 @@ export function Track({track, set_value, change_track_type, copy_track, delete_t {track.type!=""?(
- + set_value("height",e.target.value)}>
- + set_value("margin_above",e.target.value)}>
- + set_value("bounding_box",!track.bounding_box)}/>
- + set_value("fontscale",e.target.value)}>
- + set_value("label",e.target.value)} >
- + set_value("label_rotate",!track.label_rotate)} >
@@ -111,7 +111,7 @@ function ChrTrack({track,set_value}){ <>
- +
- + set_value("lw_scale",e.target.value)} >
- + {set_value("unit",e.target.value)}}> @@ -145,15 +145,15 @@ function ChrTrack({track,set_value}){
- + set_value("ticks_interval",e.target.value)} >
- + set_value("ticks_angle",e.target.value)} >
- + set_value("chr_prefix",e.target.value)} >
):""} @@ -168,7 +168,7 @@ function GenesTrack({track,set_value,openColorPanel}){ <>
- + set_value("collapsed",!track.collapsed)} >
- + set_value("only_protein_coding",!track.only_protein_coding)} >
- + set_value("exon_color",c)} openColorPanel={openColorPanel}/>
@@ -194,12 +194,12 @@ function GenesTrack({track,set_value,openColorPanel}){
- + set_value("genes",e.target.value)} >
- + set_value("show_gene_names",!track.show_gene_names)} >
@@ -214,9 +214,9 @@ function BedTrack({track,set_value,openColorPanel, setFileDialogData,setFileDial return ( <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/>
- + set_value("use_file_colors",!track.use_file_colors)} >
{(!track.use_file_colors)?( @@ -227,15 +227,15 @@ function BedTrack({track,set_value,openColorPanel, setFileDialogData,setFileDial }
- + set_value("show_names",!track.show_names)} >
- + set_value("show_strand",!track.show_strand)} >
- + set_value("collapsed",!track.collapsed)} >
@@ -252,19 +252,19 @@ function BigWigTrack({track,set_value,openColorPanel, setFileDialogData,setFileD <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/>
- + set_value("color",c)} openColorPanel={openColorPanel}>
- + set_value("n_bins",e.target.value)} >
{/* scale */}
- + set_value("group",e.target.value)} >
):"" }
- + set_value("upside_down",!track.upside_down)} />
@@ -312,18 +312,18 @@ function CoverageTrack({track,set_value,openColorPanel, setFileDialogData,setFil return ( <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/>
- + set_value("color",c)} openColorPanel={openColorPanel}>
- + set_value("n_bins",e.target.value)} >
- + {set_value("scale_pos",e.target.value)}}> @@ -355,7 +355,7 @@ function CoverageTrack({track,set_value,openColorPanel, setFileDialogData,setFil
- + set_value("upside_down",!track.upside_down)} />
@@ -404,20 +404,20 @@ function AlignmentsTrack({track,set_value,openColorPanel, setFileDialogData,setF return ( <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive} /> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive} />
- + set_value("hgap_bp",e.target.value)} >
- + set_value("vgap_frac",e.target.value)} >
- + set_value("read_color",c)} openColorPanel={openColorPanel}/>
@@ -426,29 +426,29 @@ function AlignmentsTrack({track,set_value,openColorPanel, setFileDialogData,setF
- + set_value("link_splitreads",!track.link_splitreads)} >
{track.link_splitreads ? (<>
- + set_value("only_show_splitreads",!track.only_show_splitreads)} >
- + set_value("splitread_color",c)} openColorPanel={openColorPanel}/>
- + set_value("link_color",c)} openColorPanel={openColorPanel}/>
- + set_value("link_lw",e.target.value)} />
- + set_value("min_splitreads_breakpoints",e.target.value)} />
@@ -460,7 +460,7 @@ function AlignmentsTrack({track,set_value,openColorPanel, setFileDialogData,setF {/* Group by*/}
- + set_value("show_unphased",!track.show_unphased)} >
- + set_value("exchange_haplotypes",!track.exchange_haplotypes)} >
- + set_value("show_haplotype_colors",!track.show_haplotype_colors)} >
- + setHaplotypeLabel(e,0)} > {track.show_haplotype_colors?(setHaplotypeColors(c,0)} openColorPanel={openColorPanel}> ):""}
- + setHaplotypeLabel(e,1)} > {track.show_haplotype_colors?(setHaplotypeColors(c,1)} openColorPanel={openColorPanel}> ):""} @@ -499,7 +499,7 @@ function AlignmentsTrack({track,set_value,openColorPanel, setFileDialogData,setF
{track.show_unphased?( <> - + setHaplotypeLabel(e,2)} /> ):""} {(track.show_haplotype_colors&&track.show_unphased)?( @@ -513,7 +513,7 @@ function AlignmentsTrack({track,set_value,openColorPanel, setFileDialogData,setF {/* Color by*/}
- + setBasemod(0,0,e.target.value)}/> setBasemod(0,1,e.target.value)}/> setBasemod(0,2,c)} openColorPanel={openColorPanel}/>
- {track.basemods.length==1? ():""} + {track.basemods.length==1? ():""} {track.basemods.length==2? ( <>
- + setBasemod(1,0,e.target.value)}/> setBasemod(1,1,e.target.value)}/> setBasemod(1,2,c)} openColorPanel={openColorPanel}/>
- + ):""}
- + set_value("fix_hardclip_basemod",!track.fix_hardclip_basemod)} >
@@ -566,9 +566,9 @@ function HicTrack({track,set_value, setFileDialogData,setFileDialogActive}){ return ( <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive} /> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive} />
- + {set_value("scale",e.target.value)}}> @@ -594,13 +594,13 @@ function HicTrack({track,set_value, setFileDialogData,setFileDialogActive}){
):(
- + set_value("scale_max_percentile",e.target.value)} >
) }
- + set_value("show_colorbar",!track.show_colorbar)} />
@@ -609,30 +609,30 @@ function HicTrack({track,set_value, setFileDialogData,setFileDialogActive}){
- + set_value("max_dist",e.target.value)} />
- + set_value("extend",!track.extend)} />
- + set_value("interactions_across_regions",!track.interactions_across_regions)} />
{track.interactions_across_regions?(
- + set_value("double_interactions_across_regions",!track.double_interactions_across_regions)} />
):""}
- + set_value("pixel_border",!track.pixel_border)} />
- + set_value("upside_down",!track.upside_down)} />
@@ -646,31 +646,31 @@ function SvTrack({track,set_value,openColorPanel, setFileDialogData,setFileDialo return ( <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive} /> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive} />
- + set_value("lw",e.target.value)} >
- + set_value("color_del",c)} openColorPanel={openColorPanel}/>
- + set_value("color_dup",c)} openColorPanel={openColorPanel}/>
- + set_value("color_h2h",c)} openColorPanel={openColorPanel}/>
- + set_value("color_t2t",c)} openColorPanel={openColorPanel}/>
- + set_value("color_trans",c)} openColorPanel={openColorPanel}/>
@@ -679,7 +679,7 @@ function SvTrack({track,set_value,openColorPanel, setFileDialogData,setFileDialo
- + set_value("min_sv_height",e.target.value)} >
@@ -697,7 +697,7 @@ function CopynumberTrack({track,set_value,openColorPanel, setFileDialogData,setF <>
- + set_value("ploidy",e.target.value)}/>
- + set_value("min_cn",e.target.value)}/>
- + set_value("max_cn",e.target.value)}/>
- + set_value("genes",e.target.value)} />
@@ -745,25 +745,25 @@ function CopynumberTrack({track,set_value,openColorPanel, setFileDialogData,setF
- + set_value("marker_size",e.target.value)}/>
{/* Colors */}
- + set_value("color_normal",c)} openColorPanel={openColorPanel}/>
- + set_value("color_loss",c)} openColorPanel={openColorPanel}/>
- + set_value("color_gain",c)} openColorPanel={openColorPanel}/>
{(track.input_type=="purple")?(
- + set_value("color_cnloh",c)} openColorPanel={openColorPanel}/>
):""}
@@ -772,21 +772,21 @@ function CopynumberTrack({track,set_value,openColorPanel, setFileDialogData,setF {/* Grid */}
- + set_value("grid",!track.grid)} >
{track.grid? ( <>
- + set_value("grid_major",!track.grid_major)} >
- + set_value("grid_minor",!track.grid_minor)} >
- + set_value("grid_cn",!track.grid_cn)} >
@@ -804,8 +804,8 @@ function AseTrack({track,set_value,openColorPanel, setFileDialogData,setFileDial return ( <>
- set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/> - set_value("vcf_DNA",val)} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/> + set_value("file",val)} className={fileClass} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/> + set_value("vcf_DNA",val)} setFileDialogData={setFileDialogData} setFileDialogActive={setFileDialogActive}/>
set_value("color1",c)} openColorPanel={openColorPanel}> @@ -817,23 +817,23 @@ function AseTrack({track,set_value,openColorPanel, setFileDialogData,setFileDial
- + set_value("min_depth",e.target.value)} >
- + set_value("max_bar_width",e.target.value)} >
- + set_value("lw",e.target.value)} >
- + set_value("only_exonic",!track.only_exonic)} />
- + set_value("grid",!track.grid)} />
@@ -985,10 +985,10 @@ function select_file(set_value,initial_value,setFileDialogData,setFileDialogActi } }); } -export function PathEntry({id,label,value,set_value,className="",setFileDialogData,setFileDialogActive}){ +export function PathEntry({id,title="",label,value,set_value,className="",setFileDialogData,setFileDialogActive}){ return(
- + set_value(e.target.value) } style={{marginLeft:"2mm", marginRight:"1mm"}}>