ensembl-hive  2.7.0
Xref.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::Xref;
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<xref>
35 
36 =cut
37 
38 __PACKAGE__->table("xref");
39 
40 =head1 ACCESSORS
41 
42 =head2 xref_id
43 
44  data_type: 'integer'
45  extra: {unsigned => 1}
46  is_auto_increment: 1
47  is_nullable: 0
48 
49 =head2 accession
50 
51  data_type: 'varchar'
52  is_nullable: 0
53  size: 255
54 
55 =head2 version
56 
57  data_type: 'integer'
58  extra: {unsigned => 1}
59  is_nullable: 1
60 
61 =head2 label
62 
63  data_type: 'varchar'
64  is_nullable: 1
65  size: 255
66 
67 =head2 description
68 
69  data_type: 'text'
70  is_nullable: 1
71 
72 =head2 source_id
73 
74  data_type: 'integer'
75  extra: {unsigned => 1}
76  is_nullable: 0
77 
78 =head2 species_id
79 
80  data_type: 'integer'
81  extra: {unsigned => 1}
82  is_nullable: 0
83 
84 =head2 info_type
85 
86  data_type: 'enum'
87  default_value: 'NONE'
88  extra: {list => ["NONE","PROJECTION","MISC","DEPENDENT","DIRECT","SEQUENCE_MATCH","INFERRED_PAIR","PROBE","UNMAPPED","COORDINATE_OVERLAP","CHECKSUM"]}
89  is_nullable: 0
90 
91 =head2 info_text
92 
93  data_type: 'varchar'
94  default_value: (empty string)
95  is_nullable: 0
96  size: 255
97 
98 =head2 dumped
99 
100  data_type: 'enum'
101  extra: {list => ["MAPPED","NO_DUMP_ANOTHER_PRIORITY","UNMAPPED_NO_MAPPING","UNMAPPED_NO_MASTER","UNMAPPED_MASTER_FAILED","UNMAPPED_NO_STABLE_ID","UNMAPPED_INTERPRO"]}
102  is_nullable: 1
103 
104 =cut
105 
106 __PACKAGE__->add_columns(
107  "xref_id",
108  {
109  data_type => "integer",
110  extra => { unsigned => 1 },
111  is_auto_increment => 1,
112  is_nullable => 0,
113  },
114  "accession",
115  { data_type => "varchar", is_nullable => 0, size => 255 },
116  "version",
117  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 1 },
118  "label",
119  { data_type => "varchar", is_nullable => 1, size => 255 },
120  "description",
121  { data_type => "text", is_nullable => 1 },
122  "source_id",
123  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 },
124  "species_id",
125  { data_type => "integer", extra => { unsigned => 1 }, is_nullable => 0 },
126  "info_type",
127  {
128  data_type => "enum",
129  default_value => "NONE",
130  extra => {
131  list => [
132  "NONE",
133  "PROJECTION",
134  "MISC",
135  "DEPENDENT",
136  "DIRECT",
137  "SEQUENCE_MATCH",
138  "INFERRED_PAIR",
139  "PROBE",
140  "UNMAPPED",
141  "COORDINATE_OVERLAP",
142  "CHECKSUM",
143  ],
144  },
145  is_nullable => 0,
146  },
147  "info_text",
148  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
149  "dumped",
150  {
151  data_type => "enum",
152  extra => {
153  list => [
154  "MAPPED",
155  "NO_DUMP_ANOTHER_PRIORITY",
156  "UNMAPPED_NO_MAPPING",
157  "UNMAPPED_NO_MASTER",
158  "UNMAPPED_MASTER_FAILED",
159  "UNMAPPED_NO_STABLE_ID",
160  "UNMAPPED_INTERPRO",
161  ],
162  },
163  is_nullable => 1,
164  },
165 );
166 
167 =head1 PRIMARY KEY
168 
169 =over 4
170 
171 =item * L</xref_id>
172 
173 =back
174 
175 =cut
176 
177 __PACKAGE__->set_primary_key("xref_id");
178 
179 =head1 UNIQUE CONSTRAINTS
180 
181 =head2 C<acession_idx>
182 
183 =over 4
184 
185 =item * L</accession>
186 
187 =item * L</label>
188 
189 =item * L</source_id>
190 
191 =item * L</species_id>
192 
193 =back
194 
195 =cut
196 
197 __PACKAGE__->add_unique_constraint(
198  "acession_idx",
199  ["accession", "label", "source_id", "species_id"],
200 );
201 
202 __PACKAGE__->might_have('object_xref', 'Xref::Schema::Result::ObjectXref','xref_id'); # Not true until after the mapping is completed
203 __PACKAGE__->has_one('source', 'Xref::Schema::Result::Source', 'source_id');
204 __PACKAGE__->has_many('synonym', 'Xref::Schema::Result::Synonym', 'xref_id' );
205 
206 1;
accession
public accession()
Xref::Schema::Result::Xref
Definition: Xref.pm:5