Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow retrevial of genomeproject or replicon associated with the gene…

… object directly
  • Loading branch information...
commit 494c8da869ad0b934575ba0d66991f4fa0d6edd7 1 parent d0dc452
@mlangill authored
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 ) = @_;
Please sign in to comment.
Something went wrong with that request. Please try again.