2862b2a8ea3a56805265df693bf94a4ed7d07cca hiram Thu Jul 21 18:04:51 2022 -0700 adding the viral group to the index page footer table and special sets of columns for virus index pages refs #29545 diff --git src/hg/makeDb/doc/asmHubs/trackData.pl src/hg/makeDb/doc/asmHubs/trackData.pl index 289789c..64ea1ba 100755 --- src/hg/makeDb/doc/asmHubs/trackData.pl +++ src/hg/makeDb/doc/asmHubs/trackData.pl @@ -186,50 +186,55 @@ print <<"END" <h3>See also: <a href='$indexUrl.html'>hub access</a>, <a href='$asmStats.html'>assembly statistics</a></h3><br> <h3>Data resource links</h3> NOTE: <em>Click on the column headers to sort the table by that column</em><br> The <em>link to genome browser</em> will attach only that single assembly to the genome browser.<br> The numbers are: item count (percent coverage)<br> Except for the gc5Base column which is: overall GC % average (percent coverage) END } # sub startHtml() # order of columns in the table # eliminated the ncbiGene track my @trackList = qw(ncbiRefSeq xenoRefGene augustus ensGene gc5Base allGaps assembly rmsk simpleRepeat windowMasker cpgIslandExtUnmasked); +### XXX beware, this trackList is going to be edited below to add or +### remove elements depending upon the situation ############################################################################## ### start the table output ############################################################################## sub startTable() { # coordinate the order of these column headings with the @trackList listed above print '<table class="sortable" border="1"> <thead><tr><th>count</th> <th>common name<br>link to genome browser</th> - <th class="sorttable_numeric">ncbiRefSeq</th> '; + print '<th class="sorttable_numeric">ncbiRefSeq</th> +' if ("viral" ne $asmHubName); print " <th class=\"sorttable_numeric\">ncbiGene</th>\n" if ($testOutput); print ' <th class="sorttable_numeric">xenoRefGene</th> <th class="sorttable_numeric">augustus<br>genes</th> <th class="sorttable_numeric">Ensembl<br>genes</th> - <th class="sorttable_numeric">gc5 base</th> +' if ("viral" ne $asmHubName); + +print ' <th class="sorttable_numeric">gc5 base</th> '; if ($testOutput) { print " <th class=\"sorttable_numeric\">AGP<br>gap</th>\n"; print " <th class=\"sorttable_numeric\">all<br>gaps</th>\n"; } else { print " <th class=\"sorttable_numeric\">gaps</th>\n"; } print ' <th class="sorttable_numeric">assembly<br>sequences</th> <th class="sorttable_numeric">Repeat<br>Masker</th> <th class="sorttable_numeric">TRF<br>simpleRepeat</th> <th class="sorttable_numeric">window<br>Masker</th> '; @@ -336,32 +341,42 @@ ############################################################################## sub tableContents() { my $asmCounted = 0; if ($testOutput) { # add extra columns during 'test' output # 0 1 2 3 4 5 6 # 7 8 9 10 11 12 13 # 14 # my @trackList = qw(ncbiRefSeq xenoRefGene augustus ensGene gc5Base gap allGaps assembly rmsk simpleRepeat windowMasker gapOverlap tandemDups cpgIslandExtUnmasked cpgIslandExt); # 0 1 2 3 4 5 6 # 7 8 9 10 # my @trackList = qw(ncbiRefSeq xenoRefGene augustus ensGene gc5Base allGaps assembly rmsk simpleRepeat windowMasker cpgIslandExtUnmasked); splice @trackList, 11, 0, "cpgIslandExt"; splice @trackList, 10, 0, "tandemDups"; splice @trackList, 10, 0, "gapOverlap"; splice @trackList, 5, 0, "gap"; + } + if ("viral" eq $asmHubName) { + splice @trackList, 3, 1; + splice @trackList, 2, 1; + splice @trackList, 1, 1; + } + if ($testOutput) { # add extra columns during 'test' output splice @trackList, 1, 0, "ncbiGene"; } + if ("viral" eq $asmHubName) { + splice @trackList, 0, 1; + } foreach my $asmId (@orderList) { my $gcPrefix = "GCx"; my $asmAcc = "asmAcc"; my $asmName = "asmName"; my $accessionId = "GCx_098765432.1"; my $accessionDir = ""; my $configRa = "n/a"; my $tracksCounted = 0; my $buildDir = "/hive/data/genomes/asmHubs/refseqBuild/$accessionDir/$asmId"; my $asmReport="$buildDir/download/${asmId}_assembly_report.txt"; my $chromSizes = "${buildDir}/${asmId}.chrom.sizes"; my $twoBit = "${buildDir}/trackData/addMask/${asmId}.masked.2bit"; my $faSizeTxt = "${buildDir}/${asmId}.faSize.txt"; if ($asmId !~ m/^GC/) { $configRa = "/hive/data/genomes/$asmId/$asmId.config.ra";