303cc7fe3c22a430303783b284c830846f535eaf hiram Fri Dec 8 07:41:09 2023 -0800 make the table header sticky so it will stay at the top of the page when scrolled refs #28930 diff --git src/hg/gar/garTable.pl src/hg/gar/garTable.pl index abef90d..efcc16e 100755 --- src/hg/gar/garTable.pl +++ src/hg/gar/garTable.pl @@ -726,31 +726,31 @@ if (defined($usedGenArk{$genArkAsmId})) { ++$usedGenArk; printf STDERR "# used genArk %s %s %s\n", $genArkAsmId, $gClade, $genArkAsm{$genArkAsmId} if ($usedGenArk < 5); } else { ++$missedGenArk; printf STDERR "# missed genArk %s %s %s\n", $genArkAsmId, $gClade, $genArkAsm{$genArkAsmId} if ($gClade !~ m/viral|bacteria/); } } printf STDERR "# should be UCSC RR %s, used GenArk: %s, missed GenArk: %s\n", commify($shouldBeUcsc), commify($usedGenArk), commify($missedGenArk); printf "<hr>\n"; if ( 1 == 0 ) { printf "<button id='summaryCountsHideShow' onclick='gar.hideTable(\"summaryCounts\")'>[hide]</button>\n"; printf "<table class='sortable borderOne' id='summaryCounts'>\n"; printf "<caption style='text-align:center;'><b>===== summary counts =====</b></caption>\n"; -printf "<thead>\n"; +printf "<thead style='position:sticky; top:0;'>\n"; printf "<tr>\n"; printf "<th>number of assemblies</th>\n"; printf "<th>category of count</th>\n"; printf "<th>table data in tsv<br>(tab separated value)<br>file format</th>\n"; printf "<th>assembly minimal size<br>to filter out projects that<br>are not whole genomes</th>\n"; printf "</tr>\n"; printf "</thead><tbody>\n"; printf "<tr><th style='text-align:right;'>%s</th><th>total number of NCBI assemblies under consideration</th><th> </th><th> </th></tr>\n", commify($ncbiTotalAssemblies); printf "<tr><th style='text-align:right;'>%s</th><th>number of unique species in NCBI assemblies</th><th> </th><th> </th></tr>\n", commify($ncbiUniqueSpecies); printf "<tr><th style='text-align:right;'>%s</th><th>number of unique NCBI species matched to IUCN classification</th><th> </th><th> </th></tr>\n", commify($ncbiSpeciesUsed); printf "<tr><th style='text-align:right;'>%s</th><th>number of IUCN species with CR/EN/VU classification</th><th> </th><th> </th></tr>\n", commify($iucnSpeciesCount); printf "<tr><th style='text-align:right;'>%s</th><th>number of such IUCN species matched to NCBI assemblies</th><th> </th><th> </th></tr>\n", commify($iucnSpeciesUsed); printf "<tr><th style='text-align:right;'>%s</th><th>total number of NCBI assemblies classified in these tables</th><th> </th><th> </th></tr>\n", commify($totalGoodToGo); foreach my $clade (@clades) { if (defined($cladeCounts{$clade})) {