811dd66056e8ee6ceca4b67ea0551a0540ded944 hiram Thu Nov 10 11:15:09 2022 -0800 eliminate the bit about name searching no redmine diff --git src/hg/utils/automation/asmHubXenoRefGene.pl src/hg/utils/automation/asmHubXenoRefGene.pl index 8d8a6f3..90a17e7 100755 --- src/hg/utils/automation/asmHubXenoRefGene.pl +++ src/hg/utils/automation/asmHubXenoRefGene.pl @@ -1,146 +1,140 @@ #!/usr/bin/env perl use strict; use warnings; use FindBin qw($Bin); use lib "$Bin"; use AsmHub; use File::Basename; my $argc = scalar(@ARGV); if ($argc != 3) { printf STDERR "usage: asmHubXenoRefGene.pl asmId asmId.names.tab .../trackData/\n"; printf STDERR "where asmId is the assembly identifier,\n"; printf STDERR "and .../trackData/ is the path to the /trackData/ directory.\n"; exit 255; } # 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 } my $asmId = shift; my $namesFile = shift; my $trackDataDir = shift; my $xenoRefGeneBbi = "$trackDataDir/xenoRefGene/$asmId.xenoRefGene.bb"; if ( ! -s $xenoRefGeneBbi ) { printf STDERR "ERROR: can not find $asmId.xenoRefGene.bb file\n"; exit 255; } my $totalBases = `ave -col=2 $trackDataDir/../${asmId}.chrom.sizes | grep "^total" | awk '{printf "%d", \$2}'`; chomp $totalBases; my $geneStats = `cat $trackDataDir/xenoRefGene/${asmId}.xenoRefGene.stats.txt | awk '{printf "%d\\n", \$2}' | xargs echo`; chomp $geneStats; my ($itemCount, $basesCovered) = split('\s+', $geneStats); my $percentCoverage = sprintf("%.3f", 100.0 * $basesCovered / $totalBases); $itemCount = commify($itemCount); $basesCovered = commify($basesCovered); $totalBases = commify($totalBases); 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_
The RefSeq mRNAs gene track for the $assemblyDate $em${organism}$noEm/$asmId genome assembly displays translated blat alignments of vertebrate and invertebrate mRNA in GenBank.
Total genome size: $totalBases
Gene count: $itemCount
Bases in genes: $basesCovered
Percent genome coverage: % $percentCoverage
-Please note, the name searching system is not completely case insensitive. -When in doubt, enter search names in all lower case to find gene names. -
-The mRNAs were aligned against the $em${organism}$noEm/$asmId genome using translated blat. When a single mRNA aligned in multiple places, the alignment having the highest base identity was found. Only those alignments having a base identity level within 1% of the best and at least 25% base identity with the genomic sequence were kept.
Specifically, the translated blat command is:
blat -noHead -q=rnax -t=dnax -mask=lower target.fa query.fa target.query.psl where target.fa is one of the chromosome sequence of the genome assembly, and the query.fa is the mRNAs from RefSeqThe resulting PSL outputs are filtered:
pslCDnaFilter -minId=0.35 -minCover=0.25 -globalNearBest=0.0100 -minQSize=20 \ -ignoreIntrons -repsAsMatch -ignoreNs -bestOverlap \ all.results.psl $asmId.xenoRefGene.pslThe filtered $asmId.xenoRefGene.psl is converted to genePred data to display for this track.
The mRNA track was produced at UCSC from mRNA sequence data submitted to the international public sequence databases by scientists worldwide.
Benson DA, Cavanaugh M, Clark K, Karsch-Mizrachi I, Lipman DJ, Ostell J, Sayers EW. GenBank. Nucleic Acids Res. 2013 Jan;41(Database issue):D36-42. PMID: 23193287; PMC: PMC3531190
Benson DA, Karsch-Mizrachi I, Lipman DJ, Ostell J, Wheeler DL. GenBank: update. Nucleic Acids Res. 2004 Jan 1;32(Database issue):D23-6. PMID: 14681350; PMC: PMC308779
Kent WJ. BLAT - the BLAST-like alignment tool. Genome Res. 2002 Apr;12(4):656-64. PMID: 11932250; PMC: PMC187518
_EOF_ ;