Skip to content

Commit

Permalink
Add code to fix allele in --change-gene-id
Browse files Browse the repository at this point in the history
Refs #2677
  • Loading branch information
kimrutherford committed Apr 23, 2024
1 parent 4bb3708 commit 5313656
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Canto/Track/TrackUtil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,17 @@ sub change_gene_id
$gene->update();
}
}

my $allele_rs = $cursdb->resultset('Allele');

while (defined (my $allele = $allele_rs->next())) {
my $primary_identifier = $allele->primary_identifier();
if ($primary_identifier =~ /^$from_id:/) {
$primary_identifier =~ s/^$from_id:/$to_id:/;
$allele->primary_identifier($primary_identifier);
$allele->update();
}
}
};

Canto::Track::curs_map($self->config(), $track_schema, $proc);
Expand Down

0 comments on commit 5313656

Please sign in to comment.