File Coverage

blib/lib/Bio/Chado/Schema/Result/Organism/Organism.pm
Criterion Covered Total %
statement 11 15 73.3
branch 0 2 0.0
condition 0 2 0.0
subroutine 5 6 83.3
pod 1 1 100.0
total 17 26 65.3


line stmt bran cond sub pod time code
1             package Bio::Chado::Schema::Result::Organism::Organism;
2             BEGIN {
3 6     6   2880 $Bio::Chado::Schema::Result::Organism::Organism::AUTHORITY = 'cpan:RBUELS';
4             }
5             BEGIN {
6 6     6   119 $Bio::Chado::Schema::Result::Organism::Organism::VERSION = '0.08001'; # TRIAL
7             }
8              
9             # Created by DBIx::Class::Schema::Loader
10             # DO NOT MODIFY THE FIRST PART OF THIS FILE
11              
12 6     6   35 use strict;
  6         14  
  6         105  
13 6     6   26 use warnings;
  6         12  
  6         131  
14              
15 6     6   28 use base 'DBIx::Class::Core';
  6         12  
  6         1894  
16              
17              
18              
19             __PACKAGE__->table("organism");
20              
21              
22             __PACKAGE__->add_columns(
23             "organism_id",
24             {
25             data_type => "integer",
26             is_auto_increment => 1,
27             is_nullable => 0,
28             sequence => "organism_organism_id_seq",
29             },
30             "abbreviation",
31             { data_type => "varchar", is_nullable => 1, size => 255 },
32             "genus",
33             { data_type => "varchar", is_nullable => 0, size => 255 },
34             "species",
35             { data_type => "varchar", is_nullable => 0, size => 255 },
36             "common_name",
37             { data_type => "varchar", is_nullable => 1, size => 255 },
38             "comment",
39             { data_type => "text", is_nullable => 1 },
40             );
41             __PACKAGE__->set_primary_key("organism_id");
42             __PACKAGE__->add_unique_constraint("organism_c1", ["genus", "species"]);
43              
44              
45             __PACKAGE__->has_many(
46             "biomaterials",
47             "Bio::Chado::Schema::Result::Mage::Biomaterial",
48             { "foreign.taxon_id" => "self.organism_id" },
49             { cascade_copy => 0, cascade_delete => 0 },
50             );
51              
52              
53             __PACKAGE__->has_many(
54             "cell_lines",
55             "Bio::Chado::Schema::Result::CellLine::CellLine",
56             { "foreign.organism_id" => "self.organism_id" },
57             { cascade_copy => 0, cascade_delete => 0 },
58             );
59              
60              
61             __PACKAGE__->has_many(
62             "features",
63             "Bio::Chado::Schema::Result::Sequence::Feature",
64             { "foreign.organism_id" => "self.organism_id" },
65             { cascade_copy => 0, cascade_delete => 0 },
66             );
67              
68              
69             __PACKAGE__->has_many(
70             "libraries",
71             "Bio::Chado::Schema::Result::Library::Library",
72             { "foreign.organism_id" => "self.organism_id" },
73             { cascade_copy => 0, cascade_delete => 0 },
74             );
75              
76              
77             __PACKAGE__->has_many(
78             "organism_dbxrefs",
79             "Bio::Chado::Schema::Result::Organism::OrganismDbxref",
80             { "foreign.organism_id" => "self.organism_id" },
81             { cascade_copy => 0, cascade_delete => 0 },
82             );
83              
84              
85             __PACKAGE__->has_many(
86             "organismprops",
87             "Bio::Chado::Schema::Result::Organism::Organismprop",
88             { "foreign.organism_id" => "self.organism_id" },
89             { cascade_copy => 0, cascade_delete => 0 },
90             );
91              
92              
93             __PACKAGE__->has_many(
94             "phenotype_comparisons",
95             "Bio::Chado::Schema::Result::Genetic::PhenotypeComparison",
96             { "foreign.organism_id" => "self.organism_id" },
97             { cascade_copy => 0, cascade_delete => 0 },
98             );
99              
100              
101             __PACKAGE__->has_many(
102             "phylonode_organisms",
103             "Bio::Chado::Schema::Result::Phylogeny::PhylonodeOrganism",
104             { "foreign.organism_id" => "self.organism_id" },
105             { cascade_copy => 0, cascade_delete => 0 },
106             );
107              
108              
109             __PACKAGE__->has_many(
110             "stocks",
111             "Bio::Chado::Schema::Result::Stock::Stock",
112             { "foreign.organism_id" => "self.organism_id" },
113             { cascade_copy => 0, cascade_delete => 0 },
114             );
115              
116              
117             # Created by DBIx::Class::Schema::Loader v0.07001 @ 2010-08-16 23:01:56
118             # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xuk7QNRmZZZy4a0/5jInJw
119              
120              
121             __PACKAGE__->many_to_many
122             (
123             'phylonodes',
124             'phylonode_organisms' => 'phylonode',
125             );
126              
127              
128             __PACKAGE__->many_to_many
129             (
130             'dbxrefs',
131             'organism_dbxrefs' => 'dbxref',
132             );
133              
134              
135              
136             sub create_organismprops {
137 0     0 1   my ($self, $props, $opts) = @_;
138              
139             # process opts
140 0   0       $opts ||= {};
141             $opts->{cv_name} = 'organism_property'
142 0 0         unless defined $opts->{cv_name};
143              
144 0           return Bio::Chado::Schema::Util->create_properties
145             ( properties => $props,
146             options => $opts,
147             row => $self,
148             prop_relation_name => 'organismprops',
149             );
150             }
151              
152              
153             1;
154              
155             __END__