Permalink
Browse files

Allow retrevial of genomeproject or replicon associated with the gene…

… object directly
  • Loading branch information...
1 parent d0dc452 commit 494c8da869ad0b934575ba0d66991f4fa0d6edd7 @mlangill committed Apr 10, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 Gene.pm
View
16 Gene.pm
@@ -121,6 +121,22 @@ sub field_names{
return;
}
+#returns the genomeproject associated with this gene
+sub genomeproject{
+ my ($self) =@_;
+ my $so = new MicrobeDB::Search();
+ my ($genomeproject) = $so->object_search( new MicrobeDB::GenomeProject(gpv_id => $self->gpv_id()));
+ return $genomeproject;
+}
+
+#returns the replicon associated with this gene
+sub replicon{
+ my ($self) =@_;
+ my $so = new MicrobeDB::Search();
+ my ($replicon) = $so->object_search( new MicrobeDB::Replicon(rpv_id => $self->rpv_id()));
+ return $replicon;
+}
+
sub table_names {
my ( $self, $field_name ) = @_;

0 comments on commit 494c8da

Please sign in to comment.