b4924336d330068ac4c39222f6cd730d33f486a1 hiram Thu Mar 6 15:35:53 2025 -0800 can also fixup geneName2 when transition takes place refs #32704 diff --git src/hg/utils/automation/updateName2.pl src/hg/utils/automation/updateName2.pl index bc0a8188702..aa4d9cb3cf2 100755 --- src/hg/utils/automation/updateName2.pl +++ src/hg/utils/automation/updateName2.pl @@ -43,35 +43,39 @@ } last; } } } close ($fh); my $updatedNames = 0; my $totalItems = 0; open ($fh, "-|", "genePredToBigGenePred $gpFile stdout") or die "can not read $gpFile"; while (my $line = <$fh>) { chomp $line; ++$totalItems; # the -1 keeps the trailing empty field at the end of the line my @a = split(/\t/, $line, -1); - # if name is equal to name2 see if name2 can be improved + # if name is equal to geneName see if geneName can be improved if ($a[3] eq $a[17]) { if (defined($geneId{$a[3]})) { $a[17] = $geneId{$a[3]}; ++$updatedNames; + # if name2 is equal to geneName2 reproduce name in geneName2 + if ($a[12] eq $a[18]) { + $a[18] = $a[3]; + } } } printf "%s\n", join("\t", @a); } close ($fh); printf STDERR "### updated %d items of total %d - %s\n", $updatedNames, $totalItems, $gpFile; __END__ 00 NW_027257890.1 01 99779 02 105382 03 XM_071090490.1 04 0 05 +