Merge pull request #42 from solgenomics/topic/duplicate_image_warning
[cxgn-corelibs.git] / lib / SGN / Schema / Est.pm
blob41400e280212b98f31d25bf0f93c1391eeb14da4
1 package SGN::Schema::Est;
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6 use strict;
7 use warnings;
9 use base 'DBIx::Class::Core';
12 =head1 NAME
14 SGN::Schema::Est
16 =cut
18 __PACKAGE__->table("est");
20 =head1 ACCESSORS
22 =head2 est_id
24 data_type: 'integer'
25 is_auto_increment: 1
26 is_nullable: 0
27 sequence: 'est_est_id_seq'
29 =head2 read_id
31 data_type: 'integer'
32 is_foreign_key: 1
33 is_nullable: 1
35 =head2 version
37 data_type: 'integer'
38 is_nullable: 1
40 =head2 basecaller
42 data_type: 'varchar'
43 is_nullable: 1
44 size: 40
46 =head2 seq
48 data_type: 'text'
49 is_nullable: 1
51 =head2 qscore
53 data_type: 'text'
54 is_nullable: 1
56 =head2 call_positions
58 data_type: 'text'
59 is_nullable: 1
61 =head2 status
63 data_type: 'integer'
64 is_nullable: 1
66 =head2 flags
68 data_type: 'bigint'
69 is_nullable: 1
71 =head2 date
73 data_type: 'date'
74 is_nullable: 1
76 =head2 genbank_submission_date
78 data_type: 'date'
79 is_nullable: 1
81 =head2 genbank_confirmed
83 data_type: 'boolean'
84 is_nullable: 1
86 =cut
88 __PACKAGE__->add_columns(
89 "est_id",
91 data_type => "integer",
92 is_auto_increment => 1,
93 is_nullable => 0,
94 sequence => "est_est_id_seq",
96 "read_id",
97 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
98 "version",
99 { data_type => "integer", is_nullable => 1 },
100 "basecaller",
101 { data_type => "varchar", is_nullable => 1, size => 40 },
102 "seq",
103 { data_type => "text", is_nullable => 1 },
104 "qscore",
105 { data_type => "text", is_nullable => 1 },
106 "call_positions",
107 { data_type => "text", is_nullable => 1 },
108 "status",
109 { data_type => "integer", is_nullable => 1 },
110 "flags",
111 { data_type => "bigint", is_nullable => 1 },
112 "date",
113 { data_type => "date", is_nullable => 1 },
114 "genbank_submission_date",
115 { data_type => "date", is_nullable => 1 },
116 "genbank_confirmed",
117 { data_type => "boolean", is_nullable => 1 },
119 __PACKAGE__->set_primary_key("est_id");
121 =head1 RELATIONS
123 =head2 read
125 Type: belongs_to
127 Related object: L<SGN::Schema::Seqread>
129 =cut
131 __PACKAGE__->belongs_to(
132 "read",
133 "SGN::Schema::Seqread",
134 { read_id => "read_id" },
136 is_deferrable => 1,
137 join_type => "LEFT",
138 on_delete => "CASCADE",
139 on_update => "CASCADE",
143 =head2 est_dbxrefs
145 Type: has_many
147 Related object: L<SGN::Schema::EstDbxref>
149 =cut
151 __PACKAGE__->has_many(
152 "est_dbxrefs",
153 "SGN::Schema::EstDbxref",
154 { "foreign.est_id" => "self.est_id" },
155 { cascade_copy => 0, cascade_delete => 0 },
158 =head2 qc_report
160 Type: might_have
162 Related object: L<SGN::Schema::QcReport>
164 =cut
166 __PACKAGE__->might_have(
167 "qc_report",
168 "SGN::Schema::QcReport",
169 { "foreign.est_id" => "self.est_id" },
170 { cascade_copy => 0, cascade_delete => 0 },
173 =head2 unigene_members
175 Type: has_many
177 Related object: L<SGN::Schema::UnigeneMember>
179 =cut
181 __PACKAGE__->has_many(
182 "unigene_members",
183 "SGN::Schema::UnigeneMember",
184 { "foreign.est_id" => "self.est_id" },
185 { cascade_copy => 0, cascade_delete => 0 },
189 # Created by DBIx::Class::Schema::Loader v0.07002 @ 2012-03-03 12:35:39
190 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DeimiLHdVqQ+IoBlB+xxog
192 sub hqi_seq {
193 my ( $self ) = @_;
195 if( my $qc = $self->qc_report ) {
196 return substr( $self->seq, $qc->hqi_start, $qc->hqi_length );
197 } else {
198 return $self->seq;
203 # You can replace this text with custom content, and it will be preserved on regeneration