cbf5cf161c1be2f6bfdcee0a29f334564ac9435e hiram Fri Sep 11 16:11:38 2026 -0700 silence claude noise refs #38290 diff --git src/hg/utils/automation/asmHubGc5Percent.pl src/hg/utils/automation/asmHubGc5Percent.pl index 31d3b59b068..e46222c5735 100755 --- src/hg/utils/automation/asmHubGc5Percent.pl +++ src/hg/utils/automation/asmHubGc5Percent.pl @@ -1,137 +1,137 @@ #!/usr/bin/env perl use strict; use warnings; use FindBin qw($Bin); use lib "$Bin"; use AsmHub; my $argc = scalar(@ARGV); if ($argc != 3) { printf STDERR "usage: asmHubGc5Percent.pl asmId asmId.names.tab buildDir\n"; printf STDERR "where asmId is the assembly identifier,\n"; printf STDERR "and asmId.names.tab is naming file for this assembly,\n"; - printf STDERR "and buildDir is the directory with bbi/asmId.gc5Base.bw.\n"; + printf STDERR "and buildDir is the directory with bbi/asmId.gc5Base|gcOnFly.bw.\n"; exit 255; } my $asmId = shift; my $namesFile = shift; my $buildDir = shift; my $hgDownload = "https://hgdownload.soe.ucsc.edu"; my $gc5Bw = "$buildDir/bbi/$asmId.gc5Base.bw"; my $gcOnFly = 0; if ( ! -s $gc5Bw ) { $gc5Bw = "$buildDir/bbi/$asmId.gcOnFly.bw"; $gcOnFly = 1; } if ( ! -s $gc5Bw ) { printf STDERR "ERROR: can not find gc5Base.bw or gcOnFly.bw file:\n\t'%s'\n", $gc5Bw; exit 255; } my @accParts = split('_', $asmId); my $accession = "$accParts[0]_$accParts[1]"; my $em = ""; my $noEm = ""; my $assemblyDate = `grep -v "^#" $namesFile | cut -f9`; chomp $assemblyDate; my $ncbiAssemblyId = `grep -v "^#" $namesFile | cut -f10`; chomp $ncbiAssemblyId; my $organism = `grep -v "^#" $namesFile | cut -f5`; chomp $organism; my $averageGC = `/cluster/bin/x86_64/bigWigInfo $gc5Bw | egrep "mean:" | sed -e 's/mean: //;'`; chomp $averageGC; $averageGC = sprintf("%.2f", $averageGC); print <<_EOF_
The GC percent track shows the percentage of G (guanine) and C (cytosine) bases in 5-base windows on the $assemblyDate $em${organism}$noEm/$asmId/$ncbiAssemblyId genome assembly. High GC content is typically associated with gene-rich areas. The average overall GC percent for the entire assembly is % $averageGC.
This track may be configured in a variety of ways to highlight different aspects of the displayed information. Click the "Graph configuration help" link for an explanation of the configuration options.
This track is generated on-the-fly by the browser as needed up
to a data density of 50,000 bases per pixel display. Greater than that display
density and the display transitions to using the bigWig file:
$bwUrl
You can extract the data from that file with the
kent command line program: bigWigToWig:
bigWigToWig $bwUrl stdout \\
| gzip -c > $accession.gcOnFly.varStep.gz
That bigWig data was calculated with the hgGcPercent command
with the window size of -win=50000.
To obtain the traditional 5-base window data for this track
use the following kent command line program hgGcPercent:
hgGcPercent -wigOut -doGaps -file=stdout -win=5 -verbose=0 test \\
$twoBitUrl \\
| gzip -c > ${accession}.varStep.gz
This track is displayed from the bigWig file:
$bwUrl
You can extract the data from that file with the
kent command line program: bigWigToWig:
bigWigToWig $bwUrl stdout \\
| gzip -c > $accession.gc5Base.varStep.gz
Or, you can calculate that data locally at the 5-base window size
with the following kent command line program hgGcPercent:
hgGcPercent -wigOut -doGaps -file=stdout -win=5 -verbose=0 test \\
$twoBitUrl \\
| gzip -c > ${accession}.varStep.gz
The data and presentation of this graph were prepared by Hiram Clawson.
_EOF_ ;