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 @@ -1,100 +1,120 @@ package commonHtml; # helper functions for common HTML output features use warnings; use strict; use Carp; use vars qw(@ISA @EXPORT_OK); use Exporter; @ISA = qw(Exporter); # 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
Additional hubs with collections of assemblies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Assembly hubs index pages: | \n"; - printf "Primates | \n"; - printf "Mammals | \n"; - printf "Birds | \n"; - printf "Fish | \n"; - printf "other vertebrates | \n"; - printf "legacy/superseded | \n"; - - printf "||||||||||||||||||||||||||||||||||||||||||||||||||||
Hubs assembly statistics: | \n"; - printf "Primates | \n"; - printf "Mammals | \n"; - printf "Birds | \n"; - printf "Fish | \n"; - printf "other vertebrates | \n"; - printf "legacy/superseded | \n"; - - printf "||||||||||||||||||||||||||||||||||||||||||||||||||||
Hubs track statistics: | \n"; - printf "Primates | \n"; - printf "Mammals | \n"; - printf "Birds | \n"; - printf "Fish | \n"; - printf "other vertebrates | \n"; - printf "legacy/superseded | \n"; - + printf "
Additional hubs with collections of assemblies | |||
---|---|---|---|
Collection | \n"; + printf "Hub index pages: | \n"; + printf "Assembly statistics: | \n"; + printf "Track statistics: | \n"; + printf "
other vertebrates | \n"; + } elsif ($hubName =~ m/fish/) { + printf "|||
Fishes | \n"; + } elsif ($hubName =~ m/invertebrate/) { + printf "|||
Invertebrates | \n"; + } else { + printf "|||
%s | \n", ucfirst($hubName); + } + printf "%d assemblies | \n", $hubName, $asmCounts{$hubName}; + printf "assembly stats | \n", $hubName; + printf "track stats | \n", $hubName; + printf "
VGP - Vertebrate Genome Project | \n"; + printf "%d assemblies | \n", "VGP", $asmCounts{'vgp'}; + printf "assembly stats | \n"; + printf "track stats | \n"; + printf "
legacy/superseded | \n"; + printf "%d assemblies | \n", "legacy", $asmCounts{'legacy'}; + printf "assembly stats | \n"; + printf "track stats | \n"; printf "
\n
Alternate sets of VGP assemblies | |||||
---|---|---|---|---|---|
Alternate sets of VGP assemblies | NCBI Refseq | ||||
Index pages: | \n"; printf "primary assembly | \n"; printf "alternate/haplotype | \n"; printf "trio mat/pat | \n"; printf "legacy/superseded | \n"; + printf "other NCBI Refseq assemblies | \n"; printf "
Assembly statistics: | \n"; printf "primary assembly | \n"; printf "alternate/haplotype | \n"; printf "trio mat/pat | \n"; printf "legacy/superseded | \n"; + printf "other NCBI Refseq assemblies | \n"; printf "
Track statistics: | \n"; printf "primary assembly | \n"; printf "alternate/haplotype | \n"; printf "trio mat/pat | \n"; printf "legacy/superseded | \n"; + printf "other NCBI Refseq assemblies | \n"; printf "