ac0b61420ab00d96616349e7ea289406b9054932 hiram Thu Feb 20 13:01:15 2025 -0800 tolerant of missing CpG bbi files refs #29545 diff --git src/hg/utils/automation/asmHubCpG.pl src/hg/utils/automation/asmHubCpG.pl index d3b943ebbfb..51e2bd7b22b 100755 --- src/hg/utils/automation/asmHubCpG.pl +++ src/hg/utils/automation/asmHubCpG.pl @@ -11,35 +11,30 @@ if ($argc != 3) { printf STDERR "usage: asmHubCpG.pl asmId asmId.names.tab bbi/asmId\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 bbi/asmId is the prefix to .cpgIslandExtUnmasked.bb and cpgIslandExt.bb.\n"; exit 255; } my $asmId = shift; my $namesFile = shift; my $bbiPrefix = shift; my $unmaskedBbi = "$bbiPrefix.cpgIslandExtUnmasked.bb"; my $maskedBbi = "$bbiPrefix.cpgIslandExt.bb"; -if ( ! -s $maskedBbi ) { - printf STDERR "ERROR: can not find CpG masked file:\n\t'%s'\n", $maskedBbi; - exit 255; -} - 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; print <<_EOF_
This track shows the CpG annotations on the $assemblyDate $em${organism}$noEm/$asmId genome assembly.
@@ -89,38 +84,42 @@The CpG count is the number of CG dinucleotides in the island. The Percentage CpG is the ratio of CpG nucleotide bases (twice the CpG count) to the length. The ratio of observed to expected CpG is calculated according to the formula (cited in Gardiner-Garden et al. (1987)):
Obs/Exp CpG = Number of CpG * N / (Number of C * Number of G)where N = length of sequence.
This track was generated using a modification of a program developed by G. Miklem and L. Hillier (unpublished).
Gardiner-Garden M, Frommer M. CpG islands in vertebrate genomes.