ensembl-hive  2.8.1
saccharomyces_cerevisiae.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 XrefMapper::saccharomyces_cerevisiae;
21 
23 
24 use vars qw(@ISA);
25 
26 @ISA = qw(XrefMapper::BasicMapper);
27 
28 
29 sub set_methods{
30 
31  my $default_method = 'ExonerateGappedBest1';
32  my %override_method_for_source = (
33  ExonerateGappedBest5 => ['RefSeq_mRNA','RefSeq_mRNA_predicted', 'RefSeq_ncRNA', 'RefSeq_ncRNA_predicted' ],
34  );
35 
36  return $default_method, \%override_method_for_source;
37 }
38 
39 
40 # Cerevisiae is imported from SGD. The gene and transcript stable IDs
41 # are the SGD identifiers. The display_xref_ids for genes and
42 # transcripts are calculated directly rather than via the more complex
43 # priority-based method in BasicMapper.pm
44 
45 sub build_display_xrefs {
46 
47  my ($self, $type, $external_db) = @_;
48 
49  print "Setting $type display_xrefs from $type stable IDs\n";
50  my $dir = $self->core()->dir();
51 
52  my $sql = "UPDATE $type t, xref x, external_db e SET t.display_xref_id=x.xref_id WHERE t.stable_id=x.dbprimary_acc AND e.external_db_id=x.external_db_id AND e.db_name=\'${external_db}\'\n";
53 
54  open (SQL, ">$dir/${type}_display_xref.sql");
55 
56  print SQL $sql;
57 
58  close(SQL);
59 
60 }
61 
62 sub gene_display_xref_sources {
63  my $self = shift;
64 
65  my @list = qw(
66  SGD_GENE
67  );
68 
69  my %ignore;
70 
71  return [\@list,\%ignore];
72 }
73 
74 
75 sub transcript_display_xref_sources {
76  my $self = shift;
77 
78  my @list = qw(
79  SGD_TRANSCRIPT
80  );
81 
82  my %ignore;
83 
84  return [\@list,\%ignore];
85 }
86 
87 sub gene_description_sources {
88  return (
89  "SGD_GENE"
90  );
91 }
92 
93 
94 sub gene_description_filter_regexps {
95 
96  return ();
97 
98 }
99 
100 
101 
102 1;
XrefMapper::BasicMapper
Definition: BasicMapper.pm:8