6e2ce95748a6b80895027e24e6f5086890d169bc
hiram
  Tue Nov 28 14:10:37 2023 -0800
correct style statements in html elements for border and text alignment and do not declare type javascript refs #29545

diff --git src/hg/makeDb/doc/asmHubs/mkAsmStats.pl src/hg/makeDb/doc/asmHubs/mkAsmStats.pl
index 34ead66..0079ba0 100755
--- src/hg/makeDb/doc/asmHubs/mkAsmStats.pl
+++ src/hg/makeDb/doc/asmHubs/mkAsmStats.pl
@@ -64,134 +64,134 @@
 my $subSetMessage = "subset of $asmHubName only";
 if ($asmHubName eq "vertebrate") {
    $subSetMessage = "subset of other ${asmHubName}s only";
 }
 
 if ($vgpIndex) {
   my $vgpSubset = "(set of primary assemblies)";
   if ($orderList =~ m/vgp.alternate/) {
      $vgpSubset = "(set of alternate/haplotype assemblies)";
   } elsif ($orderList =~ m/vgp.trio/) {
      $vgpSubset = "(set of trio assemblies, maternal/paternal)";
   } elsif ($orderList =~ m/vgp.legacy/) {
      $vgpSubset = "(set of legacy/superseded assemblies)";
   }
   print <<"END"
-<!DOCTYPE HTML 4.01 Transitional>
+<!DOCTYPE HTML>
 <!--#set var="TITLE" value="VGP - Vertebrate Genomes Project assembly hubs, assembly statistics" -->
 <!--#set var="ROOT" value="../.." -->
 
 <!--#include virtual="\$ROOT/inc/gbPageStartHardcoded.html" -->
 
 <h1>VGP - Vertebrate Genomes Project assembly hubs, assembly statistics</h1>
 <p>
 <a href='https://vertebrategenomesproject.org/' target=_blank>
 <img src='VGPlogo.png' width=280 alt='VGP logo'></a></p>
 <p>
 This assembly hub contains assemblies released
 by the <a href='https://vertebrategenomesproject.org/' target=_blank>
 Vertebrate Genomes Project.</a> $vgpSubset
 </p>
 
 END
 } else {
   if ($hprcIndex) {
     print <<"END"
-<!DOCTYPE HTML 4.01 Transitional>
+<!DOCTYPE HTML>
 <!--#set var="TITLE" value="HPRC - Human Pangenome Reference Consortium assembly hubs, assembly statistics" -->
 <!--#set var="ROOT" value="../.." -->
 
 <!--#include virtual="\$ROOT/inc/gbPageStartHardcoded.html" -->
 
 <h1>VGP - Human Pangenome Reference Consortium assembly hubs, assembly statistics</h1>
 <p>
 <a href='https://humanpangenome.org/' target=_blank>
 <img src='HPRC_logo.png' width=280 alt='HPRC logo'></a></p>
 <p>
 This assembly hub contains assemblies released
 by the <a href='https://humanpangenome.org/' target=_blank>
 Human Pangenome Reference Consortium.</a>
 </p>
 
 END
   } else {
     print <<"END"
-<!DOCTYPE HTML 4.01 Transitional>
+<!DOCTYPE HTML>
 <!--#set var="TITLE" value="$Name genomes assembly hubs, assembly statistics" -->
 <!--#set var="ROOT" value="../.." -->
 
 <!--#include virtual="\$ROOT/inc/gbPageStartHardcoded.html" -->
 
 <h1>$Name Genomes assembly hubs, assembly statistics</h1>
 <p>
 Assemblies from NCBI/Genbank/Refseq sources, $subSetMessage.
 </p>
 
 END
   }
 }
 
   print <<"END"
 <h3>See also: <a href='index.html'>hub access</a>,&nbsp;<a href='trackData.html'>track statistics</a></h3><br>
 
 <h3>Data resource links</h3>
 NOTE: <em>Click on the column headers to sort the table by that column</em><br>
 The <em>link to genome browser</em> will attach only that single assembly to
 the genome browser.
 END
 }
 
 ##############################################################################
 ### start the table output
 ##############################################################################
 sub startTable() {
 print <<"END"
-<table class="sortable" border="1">
+<table class="sortable" style="border: 1px solid black;">
 <thead style="position:sticky; top:0;"><tr><th>count</th>
   <th>common name<br>link&nbsp;to&nbsp;genome&nbsp;browser</th>
   <th>scientific name<br>and&nbsp;data&nbsp;download</th>
   <th>NCBI&nbsp;assembly</th>
   <th>sequence<br>count</th><th>genome&nbsp;size<br>nucleotides</th>
   <th>gap<br>count</th><th>unknown&nbsp;bases<br>(gap size sum)</th><th>masking<br>percent</th>
 </tr></thead><tbody>
 END
 }
 
 ##############################################################################
 ### end the table output
 ##############################################################################
 sub endTable() {
 
 my $commaNuc = commify($overallNucleotides);
 my $commaSeqCount = commify($overallSeqCount);
 my $commaGapSize = commify($overallGapSize);
 my $commaGapCount = commify($overallGapCount);
 
 my $percentDone = 100.0 * $asmCount / $assemblyTotal;
 my $doneMsg = "";
 if ($asmCount < $assemblyTotal) {
   $doneMsg = sprintf(" (%d build completed, %.2f %% finished)", $asmCount, $percentDone);
 }
 
 if ($assemblyTotal > 1) {
   print "
 </tbody>
-<tfoot><tr><th>TOTALS:</th><td align=center colspan=3>total assembly count&nbsp;${assemblyTotal}${doneMsg}</td>
-  <td align=right>$commaSeqCount</td>
-  <td align=right>$commaNuc</td>
-  <td align=right>$commaGapCount</td>
-  <td align=right>$commaGapSize</td>
+<tfoot><tr><th>TOTALS:</th><td style='text-align: center;' colspan=3>total assembly count&nbsp;${assemblyTotal}${doneMsg}</td>
+  <td style='text-align: right;'>$commaSeqCount</td>
+  <td style='text-align: right;'>$commaNuc</td>
+  <td style='text-align: right;'>$commaGapCount</td>
+  <td style='text-align: right;'>$commaGapSize</td>
   <td colspan=1>&nbsp;</td>
   </tr>
 ";
 
   # try extra column headers as last row for this very large index page
   if ($vgpIndex && ($asmCount > 15)) {
   print "<tr><th>count</th>
   <th>common name<br>link&nbsp;to&nbsp;genome&nbsp;browser</th>
   <th>scientific name<br>and&nbsp;data&nbsp;download</th>
   <th>NCBI&nbsp;assembly</th>
   <th>sequence<br>count</th><th>genome&nbsp;size<br>nucleotides</th>
   <th>gap<br>count</th><th>unknown&nbsp;bases<br>(gap size sum)</th><th>masking<br>percent</th>
   </tr>
 ";
   }
@@ -372,44 +372,44 @@
            ++$itemsFound;
            $taxId = $line;
            $taxId =~ s/.*:\s+//;
         }
       }
     }
     close (FH);
     my $hubUrl = "https://hgdownload.soe.ucsc.edu/hubs/$accessionDir/$accessionId";
     my $browserName = $commonName;
     my $browserUrl = "https://genome.ucsc.edu/h/$accessionId";
     if ($asmId !~ m/^GC/) {
        $hubUrl = "https://hgdownload.soe.ucsc.edu/goldenPath/$asmId/bigZips";
        $browserUrl = "https://genome.ucsc.edu/cgi-bin/hgTracks?db=$asmId";
        $browserName = "$commonName ($asmId)";
     }
-    printf "<tr><td align=right>%d</td>\n", ++$asmCount;
+    printf "<tr><td style='text-align: right;'>%d</td>\n", ++$asmCount;
 #    printf "<td align=center><a href='https://genome.ucsc.edu/cgi-bin/hgGateway?hubUrl=%s/hub.txt&amp;genome=%s&amp;position=lastDbPos' target=_blank>%s</a></td>\n", $hubUrl, $accessionId, $commonName;
-    printf "<td align=center><a href='%s' target=_blank>%s</a></td>\n", $browserUrl, $browserName;
-    printf "    <td align=center><a href='%s/' target=_blank>%s</a></td>\n", $hubUrl, $sciName;
+    printf "<td style='text-align: center;'><a href='%s' target=_blank>%s</a></td>\n", $browserUrl, $browserName;
+    printf "    <td style='text-align: center;'><a href='%s/' target=_blank>%s</a></td>\n", $hubUrl, $sciName;
     if ($asmId !~ m/^GC/) {
-      printf "    <td align=left><a href='https://www.ncbi.nlm.nih.gov/assembly/%s_%s/' target=_blank>%s_%s</a></td>\n", $gcPrefix, $asmAcc, $accessionId, $asmName;
+      printf "    <td style='text-align: left;'><a href='https://www.ncbi.nlm.nih.gov/assembly/%s_%s/' target=_blank>%s_%s</a></td>\n", $gcPrefix, $asmAcc, $accessionId, $asmName;
     } else {
-      printf "    <td align=left><a href='https://www.ncbi.nlm.nih.gov/assembly/%s/' target=_blank>%s</a></td>\n", $accessionId, $asmId;
+      printf "    <td style='text-align: left;'><a href='https://www.ncbi.nlm.nih.gov/assembly/%s/' target=_blank>%s</a></td>\n", $accessionId, $asmId;
     }
-    printf "    <td align=right>%s</td>\n", commify($seqCount);
-    printf "    <td align=right>%s</td>\n", commify($totalSize);
-    printf "    <td align=right>%s</td>\n", commify($gapCount);
-    printf "    <td align=right>%s</td>\n", commify($gapSize);
-    printf "    <td align=right>%.2f</td>\n", $maskPerCent;
+    printf "    <td style='text-align: right;'>%s</td>\n", commify($seqCount);
+    printf "    <td style='text-align: right;'>%s</td>\n", commify($totalSize);
+    printf "    <td style='text-align: right;'>%s</td>\n", commify($gapCount);
+    printf "    <td style='text-align: right;'>%s</td>\n", commify($gapSize);
+    printf "    <td style='text-align: right;'>%.2f</td>\n", $maskPerCent;
     printf "</tr>\n";
   }
 }	#	sub tableContents()
 
 ##############################################################################
 ### main()
 ##############################################################################
 
 # if there is a 'promoted' list, it has been taken out of the 'orderList'
 # so will need to stuff it back in at the correct ordered location
 my %promotedList;	# key is asmId, value is common name
 my $promotedList = dirname(${orderList}) . "/promoted.list";
 my @promotedList;	# contents are asmIds, in order by lc(common name)
 my $promotedIndex = -1;	# to walk through @promotedList;