File Coverage

blib/lib/Bio/Chado/Schema/Result/Phylogeny/Phylonode.pm
Criterion Covered Total %
statement 11 12 91.6
branch n/a
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 17 19 89.4


line stmt bran cond sub pod time code
1             package Bio::Chado::Schema::Result::Phylogeny::Phylonode;
2             BEGIN {
3 6     6   2738 $Bio::Chado::Schema::Result::Phylogeny::Phylonode::AUTHORITY = 'cpan:RBUELS';
4             }
5             BEGIN {
6 6     6   100 $Bio::Chado::Schema::Result::Phylogeny::Phylonode::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   36 use strict;
  6         13  
  6         101  
13 6     6   28 use warnings;
  6         12  
  6         126  
14              
15 6     6   28 use base 'DBIx::Class::Core';
  6         13  
  6         1908  
16              
17              
18              
19             __PACKAGE__->table("phylonode");
20              
21              
22             __PACKAGE__->add_columns(
23             "phylonode_id",
24             {
25             data_type => "integer",
26             is_auto_increment => 1,
27             is_nullable => 0,
28             sequence => "phylonode_phylonode_id_seq",
29             },
30             "phylotree_id",
31             { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
32             "parent_phylonode_id",
33             { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
34             "left_idx",
35             { data_type => "integer", is_nullable => 0 },
36             "right_idx",
37             { data_type => "integer", is_nullable => 0 },
38             "type_id",
39             { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
40             "feature_id",
41             { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
42             "label",
43             { data_type => "varchar", is_nullable => 1, size => 255 },
44             "distance",
45             { data_type => "double precision", is_nullable => 1 },
46             );
47             __PACKAGE__->set_primary_key("phylonode_id");
48             __PACKAGE__->add_unique_constraint("phylonode_phylotree_id_key1", ["phylotree_id", "right_idx"]);
49             __PACKAGE__->add_unique_constraint("phylonode_phylotree_id_key", ["phylotree_id", "left_idx"]);
50              
51              
52             __PACKAGE__->belongs_to(
53             "feature",
54             "Bio::Chado::Schema::Result::Sequence::Feature",
55             { feature_id => "feature_id" },
56             {
57             cascade_copy => 0,
58             cascade_delete => 0,
59             is_deferrable => 1,
60             join_type => "LEFT",
61             on_delete => "CASCADE",
62             on_update => "CASCADE",
63             },
64             );
65              
66              
67             __PACKAGE__->belongs_to(
68             "type",
69             "Bio::Chado::Schema::Result::Cv::Cvterm",
70             { cvterm_id => "type_id" },
71             {
72             cascade_copy => 0,
73             cascade_delete => 0,
74             is_deferrable => 1,
75             join_type => "LEFT",
76             on_delete => "CASCADE",
77             on_update => "CASCADE",
78             },
79             );
80              
81              
82             __PACKAGE__->belongs_to(
83             "parent_phylonode",
84             "Bio::Chado::Schema::Result::Phylogeny::Phylonode",
85             { phylonode_id => "parent_phylonode_id" },
86             {
87             cascade_copy => 0,
88             cascade_delete => 0,
89             is_deferrable => 1,
90             join_type => "LEFT",
91             on_delete => "CASCADE",
92             on_update => "CASCADE",
93             },
94             );
95              
96              
97             __PACKAGE__->has_many(
98             "phylonodes",
99             "Bio::Chado::Schema::Result::Phylogeny::Phylonode",
100             { "foreign.parent_phylonode_id" => "self.phylonode_id" },
101             { cascade_copy => 0, cascade_delete => 0 },
102             );
103              
104              
105             __PACKAGE__->belongs_to(
106             "phylotree",
107             "Bio::Chado::Schema::Result::Phylogeny::Phylotree",
108             { phylotree_id => "phylotree_id" },
109             {
110             cascade_copy => 0,
111             cascade_delete => 0,
112             is_deferrable => 1,
113             on_delete => "CASCADE",
114             on_update => "CASCADE",
115             },
116             );
117              
118              
119             __PACKAGE__->has_many(
120             "phylonode_dbxrefs",
121             "Bio::Chado::Schema::Result::Phylogeny::PhylonodeDbxref",
122             { "foreign.phylonode_id" => "self.phylonode_id" },
123             { cascade_copy => 0, cascade_delete => 0 },
124             );
125              
126              
127             __PACKAGE__->might_have(
128             "phylonode_organism",
129             "Bio::Chado::Schema::Result::Phylogeny::PhylonodeOrganism",
130             { "foreign.phylonode_id" => "self.phylonode_id" },
131             { cascade_copy => 0, cascade_delete => 0 },
132             );
133              
134              
135             __PACKAGE__->has_many(
136             "phylonodeprops",
137             "Bio::Chado::Schema::Result::Phylogeny::Phylonodeprop",
138             { "foreign.phylonode_id" => "self.phylonode_id" },
139             { cascade_copy => 0, cascade_delete => 0 },
140             );
141              
142              
143             __PACKAGE__->has_many(
144             "phylonode_pubs",
145             "Bio::Chado::Schema::Result::Phylogeny::PhylonodePub",
146             { "foreign.phylonode_id" => "self.phylonode_id" },
147             { cascade_copy => 0, cascade_delete => 0 },
148             );
149              
150              
151             __PACKAGE__->has_many(
152             "phylonode_relationship_objects",
153             "Bio::Chado::Schema::Result::Phylogeny::PhylonodeRelationship",
154             { "foreign.object_id" => "self.phylonode_id" },
155             { cascade_copy => 0, cascade_delete => 0 },
156             );
157              
158              
159             __PACKAGE__->has_many(
160             "phylonode_relationship_subjects",
161             "Bio::Chado::Schema::Result::Phylogeny::PhylonodeRelationship",
162             { "foreign.subject_id" => "self.phylonode_id" },
163             { cascade_copy => 0, cascade_delete => 0 },
164             );
165              
166              
167             # Created by DBIx::Class::Schema::Loader v0.07001 @ 2010-08-16 23:01:56
168             # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Enm9XCEB+9rBuKsK1F1d0A
169              
170              
171             __PACKAGE__->load_components(qw( Tree::NestedSet ));
172              
173             __PACKAGE__->tree_columns({qw{
174             root_column phylotree_id
175             left_column left_idx
176             right_column right_idx
177             level_column distance
178             }});
179              
180             # distance is not usually reliable, so use a null parent ID to
181             # determine whether something is a root node
182 0     0 1   sub is_root { ! defined shift->parent_id }
183              
184             # You can replace this text with custom content, and it will be preserved on regeneration
185             1;
186              
187             __END__