e1db15e52f8b00f85ecd45ea54f68f9a8949f8c2 hiram Mon Sep 1 22:59:47 2025 -0700 refine the check refs #35575 diff --git src/hg/makeDb/doc/asmHubs/updateLiftOverChain.pl src/hg/makeDb/doc/asmHubs/updateLiftOverChain.pl index 065590c63ee..3ef9e5c98f4 100755 --- src/hg/makeDb/doc/asmHubs/updateLiftOverChain.pl +++ src/hg/makeDb/doc/asmHubs/updateLiftOverChain.pl @@ -164,47 +164,60 @@ printf STDERR "# missing path: %s\n", $key if ($missingPath < 10); ++$missingPath; } } } } else { $asmId = $line; } } close ($fh); printf STDERR "# %d already exist, %d entries to add to table, %d missing path file\n", $alreadyExisting, $toAddCount, $missingPath; my %checked; # key is fromDb|toDb value is 1 for been examined my $hasRecipCount = 0; my $needRecip = 0; +my $moreAdd = 0; ### check for reciprocals printf STDERR "### checking for reciprocals\n"; my $totalEntries = 0; for my $fromTo (sort keys %fromToToday) { ++$totalEntries; next if (defined($checked{$fromTo})); my ($from, $to) = split('\|', $fromTo); $checked{$fromTo} = 1; my $key = sprintf("%s|%s", $to, $from); next if (defined($checked{$key})); if (defined($fromToToday{$key})) { ++$hasRecipCount; + } else { + if ( defined($validDb{$from}) && defined($validDb{$to}) ) { + if (defined($liftOverFiles{$key})) { + if (! defined($fromToToday{$key})) { + printf STDERR "# to add: %s\n", $key if ($toAddCount < 10); + printf "%s\t%s\t%s\t0.1\t0\t0\tY\t1\tN\n", $to, $from, $liftOverFiles{$key}; + ++$moreAdd; } else { ++$needRecip; printf STDERR "# need recip %s %s\n", $to, $from if ($needRecip < 10); } + } else { + printf STDERR "# need liftOver file to recip %s %s\n", $to, $from if ($needRecip < 10); + } + } + } $checked{$key} = 1; } printf STDERR "# %d totals, %d expected half, %d(%d) have reciprocals, %d(%d) need reciprocals\n", $totalEntries, int($totalEntries / 2), $hasRecipCount, 2 * $hasRecipCount, $needRecip, int($needRecip / 2); # head hasChainNets.txt | cat -A # GCA_028885625.2_NHGRI_mPonPyg2-v2.0_pri^I10$ # ^IGCA_028885625.2ToGCA_028858775.2.over.chain.gz$ # ^IGCA_028885625.2ToGCA_028878055.2.over.chain.gz$ # ^IGCA_028885625.2ToGCA_028885655.2.over.chain.gz$ # ^IGCA_028885625.2ToGCA_029281585.2.over.chain.gz$ # ^IGCA_028885625.2ToGCA_029289425.2.over.chain.gz$ # ^IGCA_028885625.2ToGCF_011100555.1.over.chain.gz$ # ^IGCA_028885625.2ToGCF_020740605.2.over.chain.gz$ # ^IGCA_028885625.2ToGCF_027406575.1.over.chain.gz$