1 package SGN
::Schema
::Unigene
;
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 use base
'DBIx::Class::Core';
18 __PACKAGE__
->table("unigene");
27 sequence: 'unigene_unigene_id_seq'
29 =head2 unigene_build_id
61 original: {data_type => "varchar"}
70 __PACKAGE__
->add_columns(
73 data_type
=> "integer",
74 is_auto_increment
=> 1,
76 sequence
=> "unigene_unigene_id_seq",
79 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
81 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
83 { data_type
=> "bigint", is_nullable
=> 1 },
85 { data_type
=> "bigint", is_nullable
=> 1 },
87 { data_type
=> "bigint", is_nullable
=> 1 },
91 default_value
=> "SGN",
93 original
=> { data_type
=> "varchar" },
96 { data_type
=> "bigint", is_nullable
=> 0 },
98 __PACKAGE__
->set_primary_key("unigene_id");
102 =head2 blast_annotations
106 Related object: L<SGN::Schema::BlastAnnotation>
110 __PACKAGE__
->has_many(
112 "SGN::Schema::BlastAnnotation",
113 { "foreign.apply_id" => "self.unigene_id" },
114 { cascade_copy
=> 0, cascade_delete
=> 0 },
121 Related object: L<SGN::Schema::Cd>
125 __PACKAGE__
->has_many(
128 { "foreign.unigene_id" => "self.unigene_id" },
129 { cascade_copy
=> 0, cascade_delete
=> 0 },
132 =head2 primer_unigene_matches
136 Related object: L<SGN::Schema::PrimerUnigeneMatch>
140 __PACKAGE__
->has_many(
141 "primer_unigene_matches",
142 "SGN::Schema::PrimerUnigeneMatch",
143 { "foreign.unigene_id" => "self.unigene_id" },
144 { cascade_copy
=> 0, cascade_delete
=> 0 },
147 =head2 rflp_unigene_associations
151 Related object: L<SGN::Schema::RflpUnigeneAssociation>
155 __PACKAGE__
->has_many(
156 "rflp_unigene_associations",
157 "SGN::Schema::RflpUnigeneAssociation",
158 { "foreign.unigene_id" => "self.unigene_id" },
159 { cascade_copy
=> 0, cascade_delete
=> 0 },
162 =head2 ssr_primer_unigenes_matches
166 Related object: L<SGN::Schema::SsrPrimerUnigeneMatches>
170 __PACKAGE__
->has_many(
171 "ssr_primer_unigenes_matches",
172 "SGN::Schema::SsrPrimerUnigeneMatches",
173 { "foreign.unigene_id" => "self.unigene_id" },
174 { cascade_copy
=> 0, cascade_delete
=> 0 },
181 Related object: L<SGN::Schema::UnigeneConsensi>
185 __PACKAGE__
->belongs_to(
187 "SGN::Schema::UnigeneConsensi",
188 { consensi_id
=> "consensi_id" },
192 on_delete
=> "CASCADE",
193 on_update
=> "CASCADE",
201 Related object: L<SGN::Schema::UnigeneBuild>
205 __PACKAGE__
->belongs_to(
207 "SGN::Schema::UnigeneBuild",
208 { unigene_build_id
=> "unigene_build_id" },
212 on_delete
=> "CASCADE",
213 on_update
=> "CASCADE",
217 =head2 unigene_members
221 Related object: L<SGN::Schema::UnigeneMember>
225 __PACKAGE__
->has_many(
227 "SGN::Schema::UnigeneMember",
228 { "foreign.unigene_id" => "self.unigene_id" },
229 { cascade_copy
=> 0, cascade_delete
=> 0 },
233 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2012-03-03 12:35:39
234 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HYSA+SrdRkUswvQeCSfweQ
241 if( $self->nr_members > 1 ) {
242 return $self->consensi->seq;
243 } elsif( $self->nr_members == 1 ) {
244 return $self->unigene_members->single->est->hqi_seq;
246 Carp
::confess
( 'unigene SGN-U'.$self->unigene_id.' has invalid nr_members ('.$self->nr_members.')' );
251 # You can replace this text with custom content, and it will be preserved on regeneration