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 Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
41 -tag_count => $tag_count,
42 -sequence => $sequence,
43 -adaptor => $dbAdaptor
48 Represents an unmapped ditag
object in the
EnsEMBL database.
49 Corresponds to original tag containing the full sequence. This can be
50 a single piece of sequence like CAGE tags or a ditag with concatenated
51 sequence from 5
' and 3' end like GIS or GSC tags.
57 package Bio::EnsEMBL::Map::Ditag;
71 Arg [1] : (optional)
int $dbID
72 Arg [2] : (optional)
string name
73 Arg [3] : (optional)
string type
74 Arg [4] : (optional)
int tag_count
75 Arg [5] : (optional)
string sequence
78 Description: Creates a
new ditag
86 my ($caller, @args) = @_;
87 my ($dbID, $name, $type, $tag_count, $sequence, $adaptor) = rearrange(
88 [
'DBID',
'NAME',
'TYPE',
'TAG_COUNT',
'SEQUENCE',
'ADAPTOR' ], @args);
89 my $class = ref($caller) || $caller;
91 if(!$name or !$type or !$sequence) {
92 throw(
'Missing information for Ditag object:
93 Bio::EnsEMBL::Map::Ditag->new (
97 -tag_count => $tag_count,
98 -sequence => $sequence,
99 -adaptor => $dbAdaptor
103 if(!$tag_count){ $tag_count = 0; }
105 if(!($sequence =~ /^[ATCGN]+$/i)){
106 throw(
'ditag sequence contains non-standard characters: '.$sequence);
109 my $self = bless( {
'dbID' => $dbID,
112 'tag_count' => $tag_count,
113 'sequence' => $sequence
116 $self->adaptor($adaptor);
122 Arg [1] : (optional)
string $type
123 Example : $type = $ditag->name;
124 Description: Getter/Setter
for the name of a ditag
134 $self->{
'name'} = shift;
137 return $self->{
'name'};
142 Arg [1] : (optional)
int id
143 Example : $ditag_id = $ditag->dbID;
144 Description: Getter/Setter
for the dbID of a ditag
154 $self->{
'dbID'} = shift;
157 return $self->{
'dbID'};
163 Arg [1] : (optional)
string $type
164 Example : $type = $ditag->type;
165 Description: Getter/Setter
for the type of a ditag
175 $self->{
'type'} = shift;
178 return $self->{
'type'};
183 Arg [1] : (optional)
string $tag_count
184 Example : $type = $ditag->tag_count;
185 Description: Getter/Setter
for the tag_count of a ditag
195 $self->{
'tag_count'} = shift;
198 return $self->{
'tag_count'};
203 Arg [1] : (optional)
string $sequence
204 Example : $sequence = $ditag->sequence;
205 Description: Getter/Setter
for the sequence of a ditag
215 $self->{
'sequence'} = shift;
218 return $self->{
'sequence'};
222 =head2 get_ditagFeatures
225 Example : @features = @{$ditag->get_ditagFeatures};
226 Description: Fetch ditag_features created from
this ditag
232 sub get_ditagFeatures {
236 ->fetch_all_by_ditagID($self->dbID);