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.
23 Please email comments or questions to the
public WormBase
24 help list at <help@wormbase.org>.
28 package Bio::EnsEMBL::IdMapping::StableIdGenerator::PristionchusPacificus;
30 # Class to generate WormBase conform Pristionchus IDs to be injected into the mapper
40 my ( $self, $lastId ) = @_;
42 throw(
"invalid stable ID: $lastId.") unless ($lastId=~/PPA/);
44 $lastId =~ /^PPA(\d+)/;
47 my $stable_id = sprintf(
"PPA%05d",$number);
52 # just in case it is actually used somewhere
54 my ( $self, $stableId ) = @_;
56 if ( defined($stableId) && $stableId =~ /^PPA\d+/)
57 {
return 1}
else {
return undef}