aaa182677fc86a82dd4cd7764cdb40a1476cedae hiram Wed Mar 30 12:47:51 2022 -0700 the selection menus now look like buttons with a down arrow icon and the column headers have an info icon refs #28930 diff --git src/hg/gar/garTable.pl src/hg/gar/garTable.pl index 788c45e..e0046ac 100755 --- src/hg/gar/garTable.pl +++ src/hg/gar/garTable.pl @@ -714,65 +714,65 @@ printf "</table>\n"; } } # if ( 1 == 0 ) # count all assemblies in all clades my $totalAssemblies = 0; foreach my $c (@clades) { $totalAssemblies += $cladeCounts{$c}; } printf "<!-- to get the pull-down menu items centered together -->\n"; printf "<div style='text-align: center;'><!-- this will cause the next div to center -->\n"; printf " <div style='display: inline-block'>\n"; printf "<div class='pullDownMenu'>\n"; -printf " <span id='speciesSelectAnchor'>choose clades to view/hide</span>\n"; +printf " <span id='speciesSelectAnchor'>choose clades to view/hide ▼</span>\n"; printf " <div class='pullDownMenuContent'>\n"; printf " <ul id='checkBoxSpeciesSelect'>\n"; printf " <li><label><input class='showAll' type='checkbox' onchange='gar.visCheckBox(this)' id='allCheckBox' value='all' checked><span class='showAllLabel'> show all</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='primatesCheckBox' value='primates' checked><span id='primatesLabel'> primates</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='mammalsCheckBox' value='mammals' checked><span id='mammalsLabel'> mammals</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='birdsCheckBox' value='birds' checked><span id='birdsLabel'> birds</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='fishCheckBox' value='fish' checked><span id='fishLabel'> fish</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='vertebrateCheckBox' value='vertebrate' checked><span id='vertebrateLabel'> vertebrate</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='invertebratesCheckBox' value='invertebrates' checked><span id='invertebratesLabel'> invertebrates</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='plantsCheckBox' value='plants' checked><span id='plantsLabel'> plants<span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='fungiCheckBox' value='fungi' checked><span id='fungiLabel'> fungi</span></label></li>\n"; printf " </ul>\n"; printf " </div>\n"; printf "</div>\n"; printf "<div style='width: 260px;' class='pullDownMenu'>\n"; -printf " <span style='text-align: center;' id='assemblyTypeAnchor'>select assembly type to display</span>\n"; +printf " <span style='text-align: center;' id='assemblyTypeAnchor'>select assembly type to display ▼</span>\n"; printf " <div class='pullDownMenuContent'>\n"; printf " <ul id='checkBoxAssemblyType'>\n"; printf " <li><label><input class='showAll' type='checkbox' onchange='gar.visCheckBox(this)' id='allCheckBox' value='all' checked><span class='showAllLabel'> show all</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='gakCheckBox' value='gak' checked><span id='gakLabel'> Existing browser</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='garCheckBox' value='gar' checked><span id='garLabel'> Request browser</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='gcaCheckBox' value='gca' checked><span id='gcaLabel'> GCA/GenBank</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='gcfCheckBox' value='gcf' checked><span id='gcfLabel'> GCF/RefSeq</span></label></li>\n"; printf " <li><label><input class='hideShow' type='checkbox' onchange='gar.visCheckBox(this)' id='iucnCheckBox' value='hasIucn' checked><span id='iucnLabel'> IUCN</span></label></li>\n"; printf " </ul>\n"; printf " </div>\n"; printf "</div>\n"; printf "<div style='width: 240px;' class='pullDownMenu'>\n"; -printf " <span id='columnSelectAnchor'>show/hide columns</span>\n"; +printf " <span id='columnSelectAnchor'>show/hide columns ▼</span>\n"; printf " <div class='pullDownMenuContent'>\n"; printf " <ul id='checkBoxColumnSelect'>\n"; -printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='comNameCheckBox' value='comName' checked> common name</label></li>\n"; +printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='comNameCheckBox' value='comName' checked> English common name</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='sciNameCheckBox' value='sciName' checked> scientific name</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='asmIdCheckBox' value='asmId' checked> NCBI Assembly</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='asmSizeCheckBox' value='asmSize'> assembly size</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='seqCountCheckBox' value='seqCount'> sequence count</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='scafN50CheckBox' value='scafN50'> scaffold N50 length (L50)</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='ctgN50CheckBox' value='ctgN50'> contig N50 length (L50)</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='IUCNCheckBox' value='IUCN'> IUCN status</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='taxIdCheckBox' value='taxId'> NCBI taxonomy ID</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='asmDateCheckBox' value='asmDate'> assembly date</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='bioSampleCheckBox' value='bioSample'> BioSample</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='bioProjectCheckBox' value='bioProject'> BioProject</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='submitterCheckBox' value='submitter'> assembly submitter</label></li>\n"; printf " <li><label><input class='columnCheckBox' type='checkbox' onchange='gar.resetColumnVis(this)' id='cladeCheckBox' value='clade'> clade</label></li>\n"; printf " </ul>\n"; printf " </div>\n"; @@ -806,45 +806,45 @@ printf "<col id='asmSize' span='1' class=colGAsmSize>\n"; printf "<col id='seqCount' span='1' class=colGAsmSeqCount>\n"; printf "<col id='scafN50' span='1' class=colGScafN50>\n"; printf "<col id='ctgN50' span='1' class=colGContigN50>\n"; printf "<col id='IUCN' span='1' class=colGIUCN>\n"; printf "<col id='taxId' span='1' class=colGTaxId>\n"; printf "<col id='asmDate' span='1' class=colGAsmDate>\n"; printf "<col id='bioSample' span='1' class=colGBioSample>\n"; printf "<col id='bioProject' span='1' class=colGBioProject>\n"; printf "<col id='submitter' span='1' class=colGSubmitter>\n"; printf "<col id='clade' span='1' class=colGClade>\n"; printf "</colgroup>\n"; printf "<thead>\n"; printf "<tr>\n"; -printf " <th class='colViewReq'><div class='tooltip'>view/request<span onclick='event.stopPropagation()' class='tooltiptext'><em>'view'</em> opens the genome browser for an existing assembly, <em>'request'</em> opens an assembly request form.</span></div></th>\n"; -printf " <th class='colComName'><div class='tooltip'>common name<span onclick='event.stopPropagation()' class='tooltiptext'>common name</span></div></th>\n"; -printf " <th class='colSciName'><div class='tooltip'>scientific name (count)<span onclick='event.stopPropagation()' class='tooltiptext'>Links to Google image search. Count shows the number of assemblies available for this orgnism.</span></div></th>\n"; -printf " <th class='colAsmId'><div class='tooltip'>NCBI Assembly<span onclick='event.stopPropagation()' class='tooltiptext'>Links to NCBI resource record.</span></div></th>\n"; -printf " <th class='colAsmSize'><div class='tooltip'>assembly<br>size<span onclick='event.stopPropagation()' class='tooltiptext'>Number of nucleotides in the assembly.</span></div></th>\n"; -printf " <th class='colAsmSeqCount'><div class='tooltip'>sequence<br>count<span onclick='event.stopPropagation()' class='tooltiptext'>The number of sequences in this assembly.</span></div></th>\n"; -printf " <th class='colScafN50'><div class='tooltip'>scaffold N50<br>length (L50)<span onclick='event.stopPropagation()' class='tooltiptext'><a href='https://en.wikipedia.org/wiki/N50,_L50,_and_related_statistics' target=_blank>N50 (L50)</a> length.</span></div> </th>\n"; -printf " <th class='colContigN50'><div class='tooltip'>contig N50<br>length (L50)<span onclick='event.stopPropagation()' class='tooltiptext'><a href='https://en.wikipedia.org/wiki/N50,_L50,_and_related_statistics' target=_blank>N50 (L50)</a> length.</span></div></th>\n"; -printf " <th class='colIUCN'><div class='tooltip'>IUCN<span onclick='event.stopPropagation()' class='tooltiptext'>Links to <a href='https://www.iucnredlist.org/' target=_blank>IUCN Red List</a> of Threatened Species (version 2021-3) <span style='color:%s;'>CR - Critical</span> / <span style='color:%s;'>EN - Endangered</span> / <span style='color:%s;'>VU - Vulnerable</span></span></div></th>\n", $statusColors{"CR"}, $statusColors{"EN"}, $statusColors{"VU"}; -printf " <th class='colTaxId'><div class='tooltip'>NCBI taxID<span onclick='event.stopPropagation()' class='tooltiptext'>Links to <a href='https://www.ncbi.nlm.nih.gov/taxonomy' target='_blank'>NCBI Taxonomy</a> database.</span></div></th>\n"; -printf " <th class='colAsmDate'><div class='tooltip'>assembly<br>date<span onclick='event.stopPropagation()' class='tooltiptext'>Date submitted to <a href='https://www.ncbi.nlm.nih.gov/assembly' target=_blank>NCBI Assembly</a> database.</span></div></th>\n"; -printf " <th class='colBioSample sorttable_alpha'><div class='tooltip'>BioSample<span onclick='event.stopPropagation()' class='tooltiptext'>BioSample ID at <a href='https://www.ncbi.nlm.nih.gov/biosample' target=_blank>NCBI</a>.</span></div></th>\n"; -printf " <th class='colBioProject sorttable_alpha'><div class='tooltip'>BioProject<span onclick='event.stopPropagation()' class='tooltiptext'>BioProject ID at <a href='https://www.ncbi.nlm.nih.gov/bioproject' target=_blank>NCBI</a>.</span></div></th>\n"; -printf " <th class='colSubmitter sorttable_alpha'><div class='tooltip'>Assembly submitter<span onclick='event.stopPropagation()' class='tooltiptextright'>Person or group who submitted to <a href='https://www.ncbi.nlm.nih.gov/assembly' target=_blank>NCBI Assembly</a> database.</span></div></th>\n"; -printf " <th class='colClade'><div class='tooltip'>clade<span onclick='event.stopPropagation()' class='tooltiptextright'>Clade of this organism.</span></div></th>\n"; +printf " <th class='colViewReq'><div class='tooltip'>view/request ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'><em>'view'</em> opens the genome browser for an existing assembly, <em>'request'</em> opens an assembly request form.</span></div></th>\n"; +printf " <th class='colComName'><div class='tooltip'>English common name ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>English common name</span></div></th>\n"; +printf " <th class='colSciName'><div class='tooltip'>scientific name (count) ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>Links to Google image search. Count shows the number of assemblies available for this orgnism.</span></div></th>\n"; +printf " <th class='colAsmId'><div class='tooltip'>NCBI Assembly ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>Links to NCBI resource record.</span></div></th>\n"; +printf " <th class='colAsmSize'><div class='tooltip'>assembly<br>size ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>Number of nucleotides in the assembly.</span></div></th>\n"; +printf " <th class='colAsmSeqCount'><div class='tooltip'>sequence<br>count ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>The number of sequences in this assembly.</span></div></th>\n"; +printf " <th class='colScafN50'><div class='tooltip'>scaffold N50<br>length (L50) ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'><a href='https://en.wikipedia.org/wiki/N50,_L50,_and_related_statistics' target=_blank>N50 (L50)</a> length.</span></div> </th>\n"; +printf " <th class='colContigN50'><div class='tooltip'>contig N50<br>length (L50) ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'><a href='https://en.wikipedia.org/wiki/N50,_L50,_and_related_statistics' target=_blank>N50 (L50)</a> length.</span></div></th>\n"; +printf " <th class='colIUCN'><div class='tooltip'>IUCN ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>Links to <a href='https://www.iucnredlist.org/' target=_blank>IUCN Red List</a> of Threatened Species (version 2021-3) <span style='color:%s;'>CR - Critical</span> / <span style='color:%s;'>EN - Endangered</span> / <span style='color:%s;'>VU - Vulnerable</span></span></div></th>\n", $statusColors{"CR"}, $statusColors{"EN"}, $statusColors{"VU"}; +printf " <th class='colTaxId'><div class='tooltip'>NCBI taxID ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>Links to <a href='https://www.ncbi.nlm.nih.gov/taxonomy' target='_blank'>NCBI Taxonomy</a> database.</span></div></th>\n"; +printf " <th class='colAsmDate'><div class='tooltip'>assembly<br>date ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>Date submitted to <a href='https://www.ncbi.nlm.nih.gov/assembly' target=_blank>NCBI Assembly</a> database.</span></div></th>\n"; +printf " <th class='colBioSample sorttable_alpha'><div class='tooltip'>BioSample ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>BioSample ID at <a href='https://www.ncbi.nlm.nih.gov/biosample' target=_blank>NCBI</a>.</span></div></th>\n"; +printf " <th class='colBioProject sorttable_alpha'><div class='tooltip'>BioProject ⓘ<span onclick='event.stopPropagation()' class='tooltiptext'>BioProject ID at <a href='https://www.ncbi.nlm.nih.gov/bioproject' target=_blank>NCBI</a>.</span></div></th>\n"; +printf " <th class='colSubmitter sorttable_alpha'><div class='tooltip'>Assembly submitter ⓘ<span onclick='event.stopPropagation()' class='tooltiptextright'>Person or group who submitted to <a href='https://www.ncbi.nlm.nih.gov/assembly' target=_blank>NCBI Assembly</a> database.</span></div></th>\n"; +printf " <th class='colClade'><div class='tooltip'>clade ⓘ<span onclick='event.stopPropagation()' class='tooltiptextright'>Clade of this organism.</span></div></th>\n"; printf "</tr>\n"; printf "</thead><tbody>\n"; my %equivalentNamesUsed; # key is NCBI sciName, value is IUCN sciName my $pageSectionCount = 0; my %checkDupAsmId; # key is asmId, value is count of times seen my %cladeSciNameCounts; # key is clade, value is number of different # scientific names my %gcfGcaCounts; # key is GCF or GCA, value is count of each my $asmCountInTable = 0; # counting the rows output my %statusCounts; # key is status: CR EN VU, value is count my $totalAssemblySize = 0; # sum of all assembly sizes