c8828612e3aba9e6c3072768129de10abe337878
hiram
Fri May 29 11:29:04 2020 -0700
now allow orderList to be specifically stated and begin common set of html functions refs #23734
diff --git src/hg/makeDb/doc/asmHubs/mkHubIndex.pl src/hg/makeDb/doc/asmHubs/mkHubIndex.pl
index c88c340..e2ee199 100755
--- src/hg/makeDb/doc/asmHubs/mkHubIndex.pl
+++ src/hg/makeDb/doc/asmHubs/mkHubIndex.pl
@@ -1,361 +1,344 @@
#!/usr/bin/env perl
+#
+# mkHubIndex.pl - construct index.html page for a set of assemblies in a hub
+#
use strict;
use warnings;
+use FindBin qw($Bin);
+use lib "$Bin";
+use commonHtml;
my $argc = scalar(@ARGV);
if ($argc != 4) {
printf STDERR "mkHubIndex.pl Name asmName defaultAsmId [two column name list] > index.html\n";
printf STDERR "e.g.: mkHubIndex Primates primates GCF_000001405.39_GRCh38.p13 primates.commonName.asmId.orderList.tsv\n";
printf STDERR "the name list is found in \$HOME/kent/src/hg/makeDb/doc/asmHubs/\n";
printf STDERR "\nthe two columns are 1: asmId (accessionId_assemblyName)\n";
printf STDERR "column 2: common name for species, columns separated by tab\n";
printf STDERR "The result prints to stdout the index.html page for this set of assemblies\n";
exit 255;
}
+my $home = $ENV{'HOME'};
+my $toolsDir = "$home/kent/src/hg/makeDb/doc/asmHubs";
+
my $Name = shift;
my $asmHubName = shift;
my $defaultAssembly = shift;
-my $commonNameOrder = shift;
-
-printf STDERR "# mkHubIndex %s %s %s %s\n", $Name, $asmHubName, $defaultAssembly, $commonNameOrder;
+my $inputList = shift;
+my $orderList = $inputList;
+if ( ! -s "$orderList" ) {
+ $orderList = $toolsDir/$inputList;
+}
-my $home = $ENV{'HOME'};
-my $toolsDir = "$home/kent/src/hg/makeDb/doc/asmHubs";
+printf STDERR "# mkHubIndex %s %s %s %s\n", $Name, $asmHubName, $defaultAssembly, $orderList;
my $vgpIndex = 0;
$vgpIndex = 1 if ($Name =~ m/vgp/i);
my %vgpClass; # key is asmId, value is taxon 'class' as set by VGP project
if ($vgpIndex) {
- my $vgpClass = "$home/kent/src/hg/makeDb/doc/vgpAsmHub/vgp.taxId,asmId.class.txt";
+ my $vgpClass = "$home/kent/src/hg/makeDb/doc/vgpAsmHub/vgp.taxId.asmId.class.txt";
open (FH, "<$vgpClass") or die "can not read $vgpClass";
while (my $line =
This assembly hub contains assemblies released
by the
-Vertebrate Genomes Project.
+Vertebrate Genomes Project. $vgpSubset
Assemblies from NCBI/Genbank/Refseq sources, $subSetMessage.
Options:
VGP - Vertebrate Genomes Project assembly hub
$Name Genomes assembly hubs
How to view the hub
https://hgdownload.soe.ucsc.edu/hubs/$asmHubName/hub.txt
After adding the hub, you will be redirected to the gateway page. The genome assemblies can be selected from the ${Name} Hub Assembly dropdown menu. Instead of adding all the assemblies in one collected group, use the individual view in browser in the table below.
NOTE: Click on the column headers to sort the table by that column
The common name/view in browser will attach only that single assembly to
the genome browser.
The scientific name/and data download link provides access to the files for that one
assembly hub.
The class/VGP link provides access to the VGP GenomeArk page for that genome
The other links provide access to NCBI resources for these assemblies.
count | common name and view in browser |
scientific name and data download |
NCBI assembly | bioSample | bioProject | assembly date, source link |
';
if ($vgpIndex) {
printf "class VGP link | \n";
}
print "
---|
\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 "
Hubs assembly statistics: | \n"; - printf "Primates | \n"; - printf "Mammals | \n"; - printf "Birds | \n"; - printf "Fish | \n"; - printf "other vertebrates | \n"; - - printf "
Hubs track statistics: | \n"; - printf "Primates | \n"; - printf "Mammals | \n"; - printf "Birds | \n"; - printf "Fish | \n"; - printf "other vertebrates | \n"; - - printf "