147dce6b6804f24a5396a7ccb0b3bee184d1f6a7
hiram
Thu Jan 2 11:47:50 2020 -0800
set of files for hub build refs @24354
diff --git src/hg/makeDb/doc/globalReference/mkHubIndex.pl src/hg/makeDb/doc/globalReference/mkHubIndex.pl
new file mode 100755
index 0000000..52db04b
--- /dev/null
+++ src/hg/makeDb/doc/globalReference/mkHubIndex.pl
@@ -0,0 +1,254 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+my $Name = "GlobalReference";
+my $asmHubWorkDir = "globalReference";
+my $defaultAssembly = "GCA_001524155.4_NA19240_prelim_3.0";
+
+my @orderList; # asmId of the assemblies in order from the *.list files
+# the order to read the different .list files:
+my @classList = qw( human );
+my %class; # key is asmId, value is from class list
+my $assemblyCount = 0;
+
+my %coriellLink; # key is asmId, value is isolate ID to construct link
+# https://www.coriell.org/0/Sections/Search/Sample_Detail.aspx?Ref=
+my %ethnicGroup; # ksy is asmId, value is ethnicity
+my %countryOfOrigin; # ksy is asmId, value is country of origin
+
+##############################################################################
+# from Perl Cookbook Recipe 2.17, print out large numbers with comma delimiters:
+##############################################################################
+sub commify($) {
+ my $text = reverse $_[0];
+ $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
+ return scalar reverse $text
+}
+
+##############################################################################
+### start the HTML output
+##############################################################################
+sub startHtml() {
+
+my $timeStamp = `date "+%F"`;
+chomp $timeStamp;
+
+#
+
+print <<"END"
+
+
+
+
+
+
+Platinum Genomes Project assembly hub
+
+This assembly hub contains assemblies released
+by the
+Platinum Genomes Project.
+
+
+How to view the hub
+
+You can load this hub from our
+Public Hubs
+page or by clicking these links to any of our official websites:
+
+
+
+
+To manually attach this hub to other genome browsers:
+
+ -
+ From the blue navigation bar, go to
+ My Data -> Track Hubs
+ -
+ Then select the My Hubs tab and enter this URL into the textbox:
+
https://hgdownload.soe.ucsc.edu/hubs/$asmHubWorkDir/hub.txt
+ -
+ Once you have added the URL to the entry form, press the Add Hub
+ button to add the hub.
+
+
+
+
+After adding the hub, you will be redirected to the gateway page. The
+genome assemblies can be selected from the Platinum Genomes Hub Assembly dropdown menu.
+
+
+
+
+Data resource links
+NOTE: Click on the column headers to sort the table by that column
+END
+}
+
+##############################################################################
+### start the table output
+##############################################################################
+sub startTable() {
+print <<"END"
+
+ethnicity link to genome browser |
+ country of origin and data download |
+ NCBI assembly |
+ bioSample | bioProject |
+ assembly date, source link |
+
+END
+}
+
+##############################################################################
+### end the table output
+##############################################################################
+sub endTable() {
+
+print <<"END"
+
+
+
+END
+}
+
+##############################################################################
+### end the HTML output
+##############################################################################
+sub endHtml() {
+print <<"END"
+
+
+
+
+