cdd0101336b3399e8d1a204a298b017a2675cc3a hiram Fri Jan 24 10:35:41 2020 -0800 now correctly using this asmHubs directories as toolsDir to obtain commonName listings refs #24748 diff --git src/hg/makeDb/doc/asmHubs/mkHubIndex.pl src/hg/makeDb/doc/asmHubs/mkHubIndex.pl index b909465..11e8ae1 100755 --- src/hg/makeDb/doc/asmHubs/mkHubIndex.pl +++ src/hg/makeDb/doc/asmHubs/mkHubIndex.pl @@ -28,40 +28,45 @@ 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; # <html xmlns="http://www.w3.org/1999/xhtml"> +my $subSetMessage = "subset of $asmHubName only"; +if ($asmHubName eq "vertebrate") { + $subSetMessage = "subset of other ${asmHubName}s only"; +} + print <<"END" <!DOCTYPE HTML 4.01 Transitional> <!--#set var="TITLE" value="$Name genomes assembly hubs" --> <!--#set var="ROOT" value="../.." --> <!--#include virtual="\$ROOT/inc/gbPageStartHardcoded.html" --> <h1>$Name Genomes assembly hubs</h1> <p> -Assemblies from NCBI/Genbank/Refseq sources, subset of $asmHubName only. +Assemblies from NCBI/Genbank/Refseq sources, $subSetMessage. </p> <h3>How to view the hub</h3> <p> You can load this hub from our <a href="https://genome.ucsc.edu/cgi-bin/hgHubConnect#publicHubs" target="_blank">Public Hubs</a> page or by clicking these assembly links to any of our official websites: <ul> <li> <a href="https://genome.ucsc.edu/cgi-bin/hgGateway?hubUrl=https://hgdownload.soe.ucsc.edu/hubs/$asmHubName/hub.txt&genome=$defaultAssembly" target="_blank">genome.ucsc.edu</a></li> <li> <a href="https://genome-euro.ucsc.edu/cgi-bin/hgGateway?hubUrl=https://hgdownload.soe.ucsc.edu/hubs/$asmHubName/hub.txt&genome=$defaultAssembly" target="_blank">genome-euro.ucsc.edu</a></li> <li> @@ -160,30 +165,31 @@ ############################################################################## ### tableContents() ############################################################################## sub tableContents() { my $rowCount = 0; foreach my $asmId (@orderList) { my $accessionDir = substr($asmId, 0 ,3); $accessionDir .= "/" . substr($asmId, 4 ,3); $accessionDir .= "/" . substr($asmId, 7 ,3); $accessionDir .= "/" . substr($asmId, 10 ,3); $accessionDir .= "/" . $asmId; my $ncbiFtpLink = "ftp://ftp.ncbi.nlm.nih.gov/genomes/all/$accessionDir/"; my $buildDir = "/hive/data/genomes/asmHubs/refseqBuild/$accessionDir"; my $asmReport="$buildDir/download/${asmId}_assembly_report.txt"; + next if (! -s "$asmReport"); my ($gcPrefix, $asmAcc, $asmName) = split('_', $asmId, 3); my $chromSizes="${buildDir}/${asmId}.chrom.sizes"; my $sciName = "notFound"; my $commonName = "notFound"; my $bioSample = "notFound"; my $bioProject = "notFound"; my $taxId = "notFound"; my $asmDate = "notFound"; my $itemsFound = 0; open (FH, "<$asmReport") or die "can not read $asmReport"; while (my $line = <FH>) { last if ($itemsFound > 5); chomp $line; $line =~ s/ //g;; $line =~ s/\s+$//g;;