Skip to content
Snippets Groups Projects
Commit 351f862a authored by Arne Stabenau's avatar Arne Stabenau
Browse files

all genes were known bug fixed

parent 1fe1c7f7
No related branches found
No related tags found
No related merge requests found
......@@ -442,7 +442,7 @@ sub _fetch_by_object_type {
my $sth = $self->prepare("
SELECT xref.xref_id, xref.dbprimary_acc, xref.display_label, xref.version,
xref.description,
exDB.db_name, exDB.release,
exDB.db_name, exDB.release, exDB.status,
oxr.object_xref_id,
es.synonym,
idt.query_identity, idt.target_identity
......@@ -462,7 +462,7 @@ sub _fetch_by_object_type {
while ( my $arrRef = $sth->fetchrow_arrayref() ) {
my ( $refID, $dbprimaryId, $displayid, $version,
$desc, $dbname, $release, $objid,
$desc, $dbname, $release, $exDB_status, $objid,
$synonym, $queryid, $targetid ) = @$arrRef;
my $exDB;
......@@ -502,6 +502,10 @@ sub _fetch_by_object_type {
$exDB->description( $desc );
}
if( $exDB_status ) {
$exDB->status( $exDB_status );
}
push( @out, $exDB );
} # if (!$seen{$refID})
......
......@@ -288,15 +288,18 @@ sub source {
sub is_known{
my ($self) = @_;
my @array;
@array = $self->get_all_DBLinks();
if( scalar(@array) > 0 ) {
return 1;
for my $entry ( @{$self->get_all_DBLinks()} ) {
if( $entry->status eq "KNOWN" ) {
return 1;
}
}
foreach my $trans ( @{$self->get_all_Transcripts} ) {
@array = $trans->get_all_DBLinks();
if( scalar(@array) > 0 ) {
return 1;
for my $entry ( @{$trans->get_all_DBLinks()} ) {
if( $entry->status eq "KNOWN" ) {
return 1;
}
}
}
......
......@@ -4,10 +4,12 @@ use warnings;
BEGIN { $| = 1;
use Test;
plan tests => 22;
plan tests => 23;
}
use MultiTestDB;
use TestUtils qw ( debug );
use Bio::EnsEMBL::Gene;
# switch on the debug prints
......@@ -189,7 +191,7 @@ foreach my $trans( @{$gene_out->get_all_Transcripts()} ){
my $pep = $trans->translate();
debug( "Peptide: ".$pep->seq() );
if($pep->seq !~ /\*\./){
if($pep->seq !~ /\*./){
$translate = 1;
} else {
$translate = 0;
......@@ -211,17 +213,25 @@ debug( "Pep phase 1: $pep2" );
ok( $pep1 ne $pep2 );
$multi->restore();
$slice = $db->get_SliceAdaptor()->fetch_by_chr_start_end("20", 30_252_000, 31_252_001 );
my ( $known, $unknown );
sub debug {
my $txt = shift;
if( $verbose ) {
print STDERR $txt,"\n";
my $genes = $slice->get_all_Genes();
for my $gene ( @$genes ) {
if( $gene->is_known() ) {
$known++;
} else {
$unknown++;
}
}
debug( "known: $known Unknown: $unknown\n" );
ok( $known==17 );
......
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