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/mkAsmStats.pl src/hg/makeDb/doc/globalReference/mkAsmStats.pl new file mode 100755 index 0000000..8d0ce11 --- /dev/null +++ src/hg/makeDb/doc/globalReference/mkAsmStats.pl @@ -0,0 +1,270 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use File::stat; + +my $asmHubWorkDir = "globalReference"; + +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 $overallNucleotides = 0; +my $overallSeqCount = 0; +my $overallGapSize = 0; +my $overallGapCount = 0; + +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" + + + + + + +
+This assembly hub contains assemblies released +by the +Platinum Genomes Project. +
+ ++
count | ethnicity link to genome browser |
+ country of origin and data download |
+ NCBI assembly | +sequence count | genome size nucleotides |
+ gap count | unknown bases (gap size sum) | masking percent |
+
---|---|---|---|---|---|---|---|---|
TOTALS: | assembly count $assemblyCount | +$commaSeqCount | +$commaNuc | +$commaGapCount | +$commaGapSize | ++ |