Commit 3c853543 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

ENSCORESW-565: added test on translation before adding a direct xref

transcript_direct_xref is added if exon overlap between ensembl transcript and refseq transcript scores high
but translation_direct_xref is only added if ensembl translation and refseq translations match
if they don't match, do not add direct xref, this gap will hopefully be filled up by the exonerate alignments
parent cc7fc764
...@@ -264,15 +264,18 @@ sub run_script { ...@@ -264,15 +264,18 @@ sub run_script {
my $t = $ta->fetch_by_stable_id($best_id); my $t = $ta->fetch_by_stable_id($best_id);
my $tl = $t->translation(); my $tl = $t->translation();
if (defined $tl && defined $tl_of) { if (defined $tl && defined $tl_of) {
($acc, $version) = split(/\./, $tl_of->stable_id()); if ($tl_of->seq eq $tl->seq) {
my $tl_xref_id = $self->add_xref({ acc => $acc, print "Both translation sequences match\n" ;
version => $version, ($acc, $version) = split(/\./, $tl_of->stable_id());
label => $tl_of->stable_id(), my $tl_xref_id = $self->add_xref({ acc => $acc,
desc => '', version => $version,
source_id => $peptide_source_id, label => $acc,
species_id => $species_id, desc => '',
info_type => 'DIRECT' }); source_id => $peptide_source_id,
$self->add_direct_xref($tl_xref_id, $tl->stable_id(), "Translation", ""); species_id => $species_id,
info_type => 'DIRECT' });
$self->add_direct_xref($tl_xref_id, $tl->stable_id(), "Translation", "");
}
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment