653eaa635409806f4885b0486125efd4390c0931 hiram Thu Aug 27 14:00:07 2020 -0700 fix scripts to behave properly when not using UCSC sequence names refs #23734 diff --git src/hg/utils/automation/ncbiRefSeqOtherAttrs.pl src/hg/utils/automation/ncbiRefSeqOtherAttrs.pl index 77898eb..4bb1a9e 100755 --- src/hg/utils/automation/ncbiRefSeqOtherAttrs.pl +++ src/hg/utils/automation/ncbiRefSeqOtherAttrs.pl @@ -76,31 +76,31 @@ # Map item IDs to extra columns: my %itemAttrs = (); my %ignoredAttrs = (); my %geneToId = (); my %idToParent = (); open(my $ATTRS, $attrsFile) || die "Can't open attributes file '$attrsFile': $!\n"; while (<$ATTRS>) { chomp; my ($id, $attr, $val) = split("\t"); $id =~ s/ /_/g; if ($attr eq 'Dbxref') { # Dbxref is one attribute, but split it up into multiple output columns for URL generation my @xrefs = split(',', $val); foreach my $xref (@xrefs) { - foreach my $source qw(GeneID MIM HGNC MGI miRBase WormBase XenBase BGD RGD SGD ZFIN FLYBASE) { + foreach my $source ( qw(GeneID MIM HGNC MGI miRBase WormBase XenBase BGD RGD SGD ZFIN FLYBASE) ) { if ($xref =~ s/^$source://) { my $ix = $attrToIx{$source}; $itemAttrs{$id}->[$ix] = $xref if (! defined $itemAttrs{$id}->[$ix]); $attrFound[$ix] = 1; } } } } elsif ($attr eq 'Parent') { $val =~ s/ /_/g; $idToParent{$id} = $val; } else { my $ix = $attrToIx{$attr}; if (defined $ix) { if ($attr eq 'gene') { $geneToId{$val} = $id;