6964f094f71a69fa083dbe3a6d88dc84f60b0855 hiram Thu Feb 25 11:44:28 2021 -0800 expanded link to other hubs table refs #23891 diff --git src/hg/makeDb/doc/asmHubs/commonHtml.pm src/hg/makeDb/doc/asmHubs/commonHtml.pm index 0697f76..9ff8c94 100644 --- src/hg/makeDb/doc/asmHubs/commonHtml.pm +++ src/hg/makeDb/doc/asmHubs/commonHtml.pm @@ -12,84 +12,104 @@ # This is a listing of the public methods and variables (which should be # treated as constants) exported by this module: @EXPORT_OK = ( qw( otherHubLinks htmlFooter ) ); # otherHubLinks: arg one: vgpIndex, arg two: asmHubName, arg three: orderList # arguments allow decision on customization of the table for different # types of assembly hubs sub otherHubLinks($$) { my ($vgpIndex, $asmHubName) = @_; +my %asmCounts; # key is hubName, value is number of assemblies +my @hubList = qw(primates mammals birds fish vertebrate invertebrate plants fungi); +foreach my $hubName (@hubList) { + my $asmCount = `grep -v "^#" ../${hubName}AsmHub/${hubName}.orderList.tsv | wc -l`; + chomp $asmCount; + $asmCounts{$hubName} = $asmCount; +} +my $vgpCount = `grep -h -v "^#" ../vgpAsmHub/vgp.*.orderList.tsv | wc -l`; +chomp $vgpCount; +$asmCounts{'vgp'} = $vgpCount; +my $legacyCount = `grep -h -v "^#" ../legacyAsmHub/legacy.orderList.tsv | wc -l`; +chomp $legacyCount; +$asmCounts{'legacy'} = $legacyCount; + # different table output for VGP index if ((0 == $vgpIndex) && ($asmHubName ne "viral")) { - printf "

\n\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - printf "\n"; - + printf "

\n

Additional hubs with collections of assemblies
Assembly hubs index pages: PrimatesMammalsBirdsFishother vertebrateslegacy/superseded
Hubs assembly statistics: PrimatesMammalsBirdsFishother vertebrateslegacy/superseded
Hubs track statistics: PrimatesMammalsBirdsFishother vertebrateslegacy/superseded
\n"; + printf "\n"; + printf "\n"; + printf " \n"; + printf " \n"; + printf " \n"; + printf "\n"; + foreach my $hubName (@hubList) { + if ($hubName =~ m/^vertebrate/) { + printf "\n"; + } elsif ($hubName =~ m/fish/) { + printf "\n"; + } elsif ($hubName =~ m/invertebrate/) { + printf "\n"; + } else { + printf "\n", ucfirst($hubName); + } + printf " \n", $hubName, $asmCounts{$hubName}; + printf " \n", $hubName; + printf " \n", $hubName; + printf "\n"; + } + printf "\n"; + printf " \n", "VGP", $asmCounts{'vgp'}; + printf " \n"; + printf " \n"; + printf "\n"; + printf "\n"; + printf " \n", "legacy", $asmCounts{'legacy'}; + printf " \n"; + printf " \n"; printf "\n
Additional hubs with collections of assemblies
CollectionHub index pages:Assembly statistics:Track statistics:
other vertebrates
Fishes
Invertebrates
%s%d assembliesassembly statstrack stats
VGP - Vertebrate Genome Project%d assembliesassembly statstrack stats
legacy/superseded%d assembliesassembly statstrack stats
\n

\n"; } elsif (1 == $vgpIndex) { printf "

\n\n"; - printf "\n"; + printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; + printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; + printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; printf "\n"; + printf "\n"; printf "\n"; printf "\n
Alternate sets of VGP assemblies
Alternate sets of VGP assembliesNCBI Refseq
Index pages: primary assemblyalternate/haplotypetrio mat/patlegacy/supersededother NCBI Refseq assemblies
Assembly statistics: primary assemblyalternate/haplotypetrio mat/patlegacy/supersededother NCBI Refseq assemblies
Track statistics: primary assemblyalternate/haplotypetrio mat/patlegacy/supersededother NCBI Refseq assemblies
\n

\n"; } } # sub otherHubLinks($$) ############################################################################ # common output at the bottom of an html index page sub htmlFooter() { print <<"END"