ensembl-hive  2.7.0
ObjectXref.pm
Go to the documentation of this file.
1 =head1 LICENSE
2 
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 
18 =cut
19 
20 package Xref::Schema::Result::ObjectXref;
21 
22 =head1 NAME
23 
25 
26 =cut
27 
28 use strict;
29 use warnings;
30 use utf8;
31 
32 use base 'DBIx::Class::Core';
33 
34 =head1 TABLE: C<object_xref>
35 
36 =cut
37 
38 __PACKAGE__->table("object_xref");
39 
40 =head1 ACCESSORS
41 
42 =head2 object_xref_id
43 
44  data_type: 'integer'
45  extra: {unsigned => 1}
46  is_auto_increment: 1
47  is_nullable: 0
48 
49 =head2 ensembl_id
50 
51  data_type: 'integer'
52  extra: {unsigned => 1}
53  is_nullable: 0
54 
55 =head2 ensembl_object_type
56 
57  data_type: 'enum'
58  extra: {list => ["RawContig","Transcript","Gene","Translation"]}
59  is_nullable: 0
60 
61 =head2 xref_id
62 
63  data_type: 'integer'
64  extra: {unsigned => 1}
65  is_nullable: 0
66 
67 =head2 linkage_annotation
68 
69  data_type: 'varchar'
70  is_nullable: 1
71  size: 255
72 
73 =head2 linkage_type
74 
75  data_type: 'enum'
76  extra: {list => ["PROJECTION","MISC","DEPENDENT","DIRECT","SEQUENCE_MATCH","INFERRED_PAIR","PROBE","UNMAPPED","COORDINATE_OVERLAP","CHECKSUM"]}
77  is_nullable: 1
78 
79 =head2 ox_status
80 
81  data_type: 'enum'
82  default_value: 'DUMP_OUT'
83  extra: {list => ["DUMP_OUT","FAILED_PRIORITY","FAILED_CUTOFF","NO_DISPLAY","MULTI_DELETE"]}
84  is_nullable: 0
85 
86 =head2 unused_priority
87 
88  data_type: 'integer'
89  extra: {unsigned => 1}
90  is_nullable: 1
91 
92 =head2 master_xref_id
93 
94  data_type: 'integer'
95  extra: {unsigned => 1}
96  is_nullable: 1
97 
98 =cut
99 
100 __PACKAGE__->add_columns(
101  "object_xref_id",
102  {
103  data_type => "integer",
104  extra => { unsigned => 1 },
105  is_auto_increment => 1,
106  is_nullable => 0,
107  },
108  "ensembl_id",
109  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 },
110  "ensembl_object_type",
111  {
112  data_type => "enum",
113  extra => { list => ["RawContig", "Transcript", "Gene", "Translation"] },
114  is_nullable => 0,
115  },
116  "xref_id",
117  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 },
118  "linkage_annotation",
119  { data_type => "varchar", is_nullable => 1, size => 255 },
120  "linkage_type",
121  {
122  data_type => "enum",
123  extra => {
124  list => [
125  "PROJECTION",
126  "MISC",
127  "DEPENDENT",
128  "DIRECT",
129  "SEQUENCE_MATCH",
130  "INFERRED_PAIR",
131  "PROBE",
132  "UNMAPPED",
133  "COORDINATE_OVERLAP",
134  "CHECKSUM",
135  ],
136  },
137  is_nullable => 1,
138  },
139  "ox_status",
140  {
141  data_type => "enum",
142  default_value => "DUMP_OUT",
143  extra => {
144  list => [
145  "DUMP_OUT",
146  "FAILED_PRIORITY",
147  "FAILED_CUTOFF",
148  "NO_DISPLAY",
149  "MULTI_DELETE",
150  ],
151  },
152  is_nullable => 0,
153  },
154  "unused_priority",
155  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 },
156  "master_xref_id",
157  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 },
158 );
159 
160 =head1 PRIMARY KEY
161 
162 =over 4
163 
164 =item * L</object_xref_id>
165 
166 =back
167 
168 =cut
169 
170 __PACKAGE__->set_primary_key("object_xref_id");
171 
172 =head1 UNIQUE CONSTRAINTS
173 
174 =head2 C<ensembl_object_type>
175 
176 =over 4
177 
178 =item * L</ensembl_object_type>
179 
180 =item * L</ensembl_id>
181 
182 =item * L</xref_id>
183 
184 =item * L</ox_status>
185 
186 =item * L</master_xref_id>
187 
188 =back
189 
190 =cut
191 
192 __PACKAGE__->add_unique_constraint(
193  "ensembl_object_type",
194  [
195  "ensembl_object_type",
196  "ensembl_id",
197  "xref_id",
198  "ox_status",
199  "master_xref_id",
200  ],
201 );
202 
203 __PACKAGE__->has_one('source', 'Xref::Schema::Result::Source', 'source_id' );
204 # Cannot express the gene/transcript/translation relationship here due to non-normalised format
205 __PACKAGE__->has_one('xref', 'Xref::Schema::Result::Xref', 'xref_id' );
206 
207 1;
Xref::Schema::Result::ObjectXref
Definition: ObjectXref.pm:5