3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
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
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.
20 package XrefMapper::db;
28 my($class, @args) = @_;
39 my ($self, $arg) = @_;
42 ($self->{_species} = $arg );
43 return $self->{_species};
53 if(!$arg->isa(
'Bio::EnsEMBL::DBSQL::DBConnection')){
54 throw(
"$arg is no a DBConnection\n");
70 Arg [1] : (optional)
string $arg
71 The
new value of the dir used
72 Example : $dir = $db->dir()
73 Description: Getter/Setter
for the directory used in the creation of fasta file
81 my ($self, $arg) = @_;
84 ($self->{_dir} = process_dir($arg) );
91 Arg [1] : (optional)
string $arg
92 the fasta file name
for the ensembl proteins
93 Example : $file_name = $self->ensembl_protein_file();
94 Description: Getter / Setter
for the protien ensembl fasta file
101 my ($self, $arg) = @_;
104 ($self->{_ens_prot_file} = $arg );
105 return $self->{_ens_prot_file};
110 Arg [1] : (optional)
string $arg
111 the fasta file name
for the ensembl dna
112 Example : $file_name = $self->ensembl_dna_file();
113 Description: Getter / Setter
for the protien ensembl fasta file
120 my ($self, $arg) = @_;
123 ($self->{_ens_dna_file} = $arg );
124 return $self->{_ens_dna_file};
130 if($dir =~
"^\/" ) { #
if it start with / then its not from pwd
132 die
"directory does not exist $dir\n";
138 elsif($dir =~
"^\.\/"){
140 $dir = cwd() .
"/" . substr( $tmp, 2 );
142 die
"directory does not exist $dir\n";
146 die
"directory does not exist $dir\n";