Skip to content
Snippets Groups Projects
Commit 596eead9 authored by Ian Longden's avatar Ian Longden
Browse files

go_xref is now ontology_xref

parent 8d3c4751
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ for my $gene_id ( @$all_gene_ids ) { ...@@ -56,7 +56,7 @@ for my $gene_id ( @$all_gene_ids ) {
my $tl = $tr->translation(); my $tl = $tr->translation();
my $dbentries = $dbEntryAdaptor->fetch_all_by_Translation( $tl ); my $dbentries = $dbEntryAdaptor->fetch_all_by_Translation( $tl );
$db_entry_count += scalar( @{$dbentries}); $db_entry_count += scalar( @{$dbentries});
$goxref_count += grep { $_->isa( "Bio::EnsEMBL::GoXref" )} @$dbentries; $goxref_count += grep { $_->isa( "Bio::EnsEMBL::OntologyXref" )} @$dbentries;
$ident_count += grep {$_->isa( "Bio::EnsEMBL::IdentityXref" )} @$dbentries; $ident_count += grep {$_->isa( "Bio::EnsEMBL::IdentityXref" )} @$dbentries;
} }
} }
...@@ -110,7 +110,7 @@ my $ident_xref = Bio::EnsEMBL::IdentityXref->new ...@@ -110,7 +110,7 @@ my $ident_xref = Bio::EnsEMBL::IdentityXref->new
$ident_xref->xref_identity( 100 ); $ident_xref->xref_identity( 100 );
$ident_xref->ensembl_identity( 95 ); $ident_xref->ensembl_identity( 95 );
my $goref = Bio::EnsEMBL::GoXref->new my $goref = Bio::EnsEMBL::OntologyXref->new
( (
-primary_id => "1", -primary_id => "1",
-dbname => "GO", -dbname => "GO",
...@@ -121,7 +121,7 @@ $goref->add_linkage_type( "IC" ); # Linkage type on own ...@@ -121,7 +121,7 @@ $goref->add_linkage_type( "IC" ); # Linkage type on own
$goref->add_linkage_type( "ISS", $goref ); # Linkage type with source xref $goref->add_linkage_type( "ISS", $goref ); # Linkage type with source xref
$multi->hide( "core", "object_xref", "xref", "identity_xref", "go_xref" ); $multi->hide( "core", "object_xref", "xref", "identity_xref", "ontology_xref" );
my $gene = $ga->fetch_by_dbID( $all_gene_ids->[0] ); my $gene = $ga->fetch_by_dbID( $all_gene_ids->[0] );
...@@ -157,7 +157,7 @@ ok( $xref_count == 3 ); ...@@ -157,7 +157,7 @@ ok( $xref_count == 3 );
# #
# 8 number of go entries right # 8 number of go entries right
# #
$go_count = count_rows($db, 'go_xref'); $go_count = count_rows($db, 'ontology_xref');
debug( "Number of go_xrefs = $go_count" ); debug( "Number of go_xrefs = $go_count" );
ok( $go_count == 2 ); ok( $go_count == 2 );
...@@ -189,7 +189,7 @@ my @syns = grep {$_ eq 'syn1' || $_ eq 'syn2'} @{$xref->get_all_synonyms}; ...@@ -189,7 +189,7 @@ my @syns = grep {$_ eq 'syn1' || $_ eq 'syn2'} @{$xref->get_all_synonyms};
ok(@syns == 2); ok(@syns == 2);
#and also 2 evidence tags, and one source_xref #and also 2 evidence tags, and one source_xref
if($xref && $xref->isa('Bio::EnsEMBL::GoXref')) { if($xref && $xref->isa('Bio::EnsEMBL::OntologyXref')) {
my @evtags = my @evtags =
grep {$_ eq 'IEA' || $_ eq 'IC'} @{$xref->get_all_linkage_types()}; grep {$_ eq 'IEA' || $_ eq 'IC'} @{$xref->get_all_linkage_types()};
ok(@evtags == 2); ok(@evtags == 2);
...@@ -207,7 +207,7 @@ $translation = $ta->fetch_by_dbID(21723)->translation; ...@@ -207,7 +207,7 @@ $translation = $ta->fetch_by_dbID(21723)->translation;
$xrefs = $dbEntryAdaptor->fetch_all_by_Translation($translation); $xrefs = $dbEntryAdaptor->fetch_all_by_Translation($translation);
($xref) = grep {$_->dbID == 257} @$xrefs; ($xref) = grep {$_->dbID == 257} @$xrefs;
if($xref && $xref->isa('Bio::EnsEMBL::GoXref')) { if($xref && $xref->isa('Bio::EnsEMBL::OntologyXref')) {
my ($evtag) = @{$xref->get_all_linkage_types()}; my ($evtag) = @{$xref->get_all_linkage_types()};
ok($evtag eq 'IC'); ok($evtag eq 'IC');
} else { } else {
...@@ -309,7 +309,7 @@ ok($xref->primary_id() eq 'IPR000010'); ...@@ -309,7 +309,7 @@ ok($xref->primary_id() eq 'IPR000010');
$multi->restore('core', 'xref'); $multi->restore('core', 'xref');
$multi->save('core', 'object_xref', 'identity_xref', 'go_xref'); $multi->save('core', 'object_xref', 'identity_xref', 'ontology_xref');
# #
# test the removal of dbentry associations # test the removal of dbentry associations
...@@ -320,11 +320,11 @@ $translation = $ta->fetch_by_dbID(21723)->translation; ...@@ -320,11 +320,11 @@ $translation = $ta->fetch_by_dbID(21723)->translation;
my $dbes = $translation->get_all_DBEntries(); my $dbes = $translation->get_all_DBEntries();
my $all_count = @$dbes; my $all_count = @$dbes;
$go_count = grep {$_->isa('Bio::EnsEMBL::GoXref')} @$dbes; $go_count = grep {$_->isa('Bio::EnsEMBL::OntologyXref')} @$dbes;
my $id_count = grep {$_->isa('Bio::EnsEMBL::IdentityXref')} @$dbes; my $id_count = grep {$_->isa('Bio::EnsEMBL::IdentityXref')} @$dbes;
my $all_total = count_rows($db, 'object_xref'); my $all_total = count_rows($db, 'object_xref');
my $go_total = count_rows($db, 'go_xref'); my $go_total = count_rows($db, 'ontology_xref');
my $id_total = count_rows($db, 'identity_xref'); my $id_total = count_rows($db, 'identity_xref');
print_dbEntries($dbes); print_dbEntries($dbes);
...@@ -337,10 +337,10 @@ foreach my $dbe (@$dbes) { ...@@ -337,10 +337,10 @@ foreach my $dbe (@$dbes) {
# make sure the appropriate rows were deleted # make sure the appropriate rows were deleted
ok($all_total - $all_count == count_rows($db, 'object_xref')); ok($all_total - $all_count == count_rows($db, 'object_xref'));
ok($go_total - $go_count == count_rows($db, 'go_xref')); ok($go_total - $go_count == count_rows($db, 'ontology_xref'));
ok($id_total - $id_count == count_rows($db, 'identity_xref')); ok($id_total - $id_count == count_rows($db, 'identity_xref'));
$multi->restore('core', 'object_xref', 'identity_xref', 'go_xref'); $multi->restore('core', 'object_xref', 'identity_xref', 'ontology_xref');
# new type checks # new type checks
...@@ -422,7 +422,7 @@ sub print_dbEntries { ...@@ -422,7 +422,7 @@ sub print_dbEntries {
foreach my $dbe (@$dbes) { foreach my $dbe (@$dbes) {
if($dbe->isa('Bio::EnsEMBL::IdentityXref')) { if($dbe->isa('Bio::EnsEMBL::IdentityXref')) {
debug("IDXref"); debug("IDXref");
} elsif($dbe->isa('Bio::EnsEMBL::GoXref')) { } elsif($dbe->isa('Bio::EnsEMBL::OntologyXref')) {
debug("GOXref"); debug("GOXref");
} elsif($dbe->isa('Bio::EnsEMBL::DBEntry')) { } elsif($dbe->isa('Bio::EnsEMBL::DBEntry')) {
debug("DBEntry"); debug("DBEntry");
......
...@@ -511,7 +511,7 @@ $multi->save( "core", "gene", "gene_stable_id", ...@@ -511,7 +511,7 @@ $multi->save( "core", "gene", "gene_stable_id",
"transcript", "transcript_stable_id", "transcript", "transcript_stable_id",
"translation", "translation_stable_id", "protein_feature", "translation", "translation_stable_id", "protein_feature",
"exon", "exon_stable_id", "exon_transcript", "supporting_feature", "exon", "exon_stable_id", "exon_transcript", "supporting_feature",
"object_xref", "go_xref", "identity_xref", "object_xref", "ontology_xref", "identity_xref",
"dna_align_feature", "protein_align_feature"); "dna_align_feature", "protein_align_feature");
$gene = $ga->fetch_by_stable_id( "ENSG00000171456" ); $gene = $ga->fetch_by_stable_id( "ENSG00000171456" );
......
...@@ -325,7 +325,7 @@ $multi->save("core", "transcript", "transcript_stable_id", "translation", ...@@ -325,7 +325,7 @@ $multi->save("core", "transcript", "transcript_stable_id", "translation",
"translation_stable_id", "protein_feature", "exon", "translation_stable_id", "protein_feature", "exon",
"exon_stable_id", "exon_transcript", "object_xref", "exon_stable_id", "exon_transcript", "object_xref",
"supporting_feature", "dna_align_feature","protein_align_feature", "supporting_feature", "dna_align_feature","protein_align_feature",
"go_xref", "identity_xref"); "ontology_xref", "identity_xref");
$ta->remove($tr); $ta->remove($tr);
......
...@@ -156,7 +156,7 @@ ok(length($seq) == $translation->length()); ...@@ -156,7 +156,7 @@ ok(length($seq) == $translation->length());
$multi->save('core', 'translation', 'translation_stable_id', $multi->save('core', 'translation', 'translation_stable_id',
'protein_feature', 'object_xref', 'identity_xref', 'protein_feature', 'object_xref', 'identity_xref',
'go_xref'); 'ontology_xref');
my $tl_count = count_rows($db, 'translation'); my $tl_count = count_rows($db, 'translation');
my $tlstable_count = count_rows($db, 'translation_stable_id'); my $tlstable_count = count_rows($db, 'translation_stable_id');
......
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