2 # BioPerl module for Bio::Map::clone
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Sendu Bala <bix@sendu.me.uk>
8 # Copyright Gaurav Gupta
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Map::Clone - An central map object representing a clone
20 # get the clone object of $clone from the Bio::Map::Clone
21 my $cloneobj = $physical->get_cloneobj($clone);
23 # acquire all the markers that hit this clone
24 foreach my $marker ($cloneobj->each_markerid()) {
25 print " +++$marker\n";
28 See L<Bio::Map::Position> and L<Bio::Map::PositionI> for more information.
32 This object handles the notion of a clone. This clone will
33 have a name and a position in a map.
35 This object is intended to be used by a map parser like fpc.pm.
41 User feedback is an integral part of the evolution of this and other
42 Bioperl modules. Send your comments and suggestions preferably to
43 the Bioperl mailing list. Your participation is much appreciated.
45 bioperl-l@bioperl.org - General discussion
46 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
50 Please direct usage questions or support issues to the mailing list:
52 I<bioperl-l@bioperl.org>
54 rather than to the module maintainer directly. Many experienced and
55 reponsive experts will be able look at the problem and quickly
56 address it. Please include a thorough description of the problem
57 with code and data examples if at all possible.
61 Report bugs to the Bioperl bug tracking system to help us keep track
62 of the bugs and their resolution. Bug reports can be submitted via the
65 https://github.com/bioperl/bioperl-live/issues
67 =head1 AUTHOR - Gaurav Gupta
69 Email gaurav@genome.arizona.edu
73 Sendu Bala bix@sendu.me.uk
75 =head1 PROJECT LEADERS
77 Jamie Hatfield jamie@genome.arizona.edu
78 Dr. Cari Soderlund cari@genome.arizona.edu
80 =head1 PROJECT DESCRIPTION
82 The project was done in Arizona Genomics Computational Laboratory (AGCoL)
83 at University of Arizona.
85 This work was funded by USDA-IFAFS grant #11180 titled "Web Resources for
86 the Computation and Display of Physical Mapping Data".
88 For more information on this project, please refer:
89 http://www.genome.arizona.edu
93 The rest of the documentation details each of the object methods.
94 Internal methods are usually preceded with a _
98 # Let the code begin...
100 package Bio
::Map
::Clone
;
102 use Bio
::Map
::Position
;
104 use base
qw(Bio::Root::Root Bio::Map::MappableI);
109 Usage : my $clone = Bio::Map::Clone->new
112 -markers => \@markers,
119 -fpnumber=> $fp_number,
120 -sequencetype => $seq_type,
121 -sequencestatus=> $seq_status,
122 -fpcremark => $fpc_remark,
126 -range => Bio::Range->new(-start => $startrange,
129 Function: Initialize a new Bio::Map::Clone object
130 Most people will not use this directly but get Clones
131 through L<Bio::MapIO::fpc>
132 Returns : L<Bio::Map::Clone> object
133 Args : -name => marker name string,
134 -markers => array ref of markers,
135 -contig => contig name string,
136 -type => type string,
137 -bands => band string,
139 -group => group name string,
140 -remark => remark string,
141 -fpnumber=> FP number string,
142 -sequencetype => seq type string,
143 -sequencestatus=> seq status string,
144 -fpcremark => FPC remark,
145 -matche => array ref,
146 -matcha => array ref,
147 -matchp => array ref,
148 -range => L<Bio::Range> object,
153 my ($class,@args) = @_;
154 my $self= $class->SUPER::new
(@args);
156 my ($name,$markers,$contig,$type,$bands,$gel,$group,
157 $remark,$fpnumber,$seqtype,$seqstatus,$fpcremark,
158 $matche,$matcha,$matchp,
159 $range) = $self->_rearrange([qw(NAME MARKERS CONTIG TYPE
160 BANDS GEL GROUP REMARK FPNUMBER
161 SEQUENCETYPE SEQUENCESTATUS
162 FPCREMARK MATCHE MATCHA MATCHP
165 $self->name($name) if defined $name;
166 $self->markers($markers) if defined $markers;
167 $self->contigid($contig) if defined $contig;
168 $self->type($type) if defined $type;
169 $self->bands($bands) if defined $bands;
170 $self->gel($gel) if defined $gel;
171 $self->group($group) if defined $group;
172 $self->remark($remark) if defined $remark;
173 $self->fp_number($fpnumber) if defined $fpnumber;
174 $self->sequence_type($seqtype) if defined $seqtype;
175 $self->sequence_status($seqstatus) if defined $seqstatus;
176 $self->fpc_remark($fpcremark) if defined $fpcremark;
177 $self->range($range) if defined $range;
179 $self->set_match('approx', $matcha) if defined $matcha;
180 $self->set_match('pseudo', $matchp) if defined $matchp;
181 $self->set_match('exact', $matche) if defined $matche;
186 =head1 Access Methods
188 These methods let you get and set the member variables
193 Usage : my $name = $cloneobj->name();
194 Function: Get/set the name for this Clone
195 Returns : scalar representing the current name of this clone
196 Args : none to get, OR string to set
202 return $self->{'_name'} = shift if @_;
203 return $self->{'_name'};
209 Usage : my $type = $cloneobj->type();
210 Function: Get/set the type for this clone
211 Returns : scalar representing the current type of this clone
212 Args : none to get, OR string to set
218 return $self->{'_type'} = shift if @_;
219 return $self->{'_type'};
225 Usage : my $range = $cloneobj->range();
226 Function: Get/set the range of the contig that this clone covers
227 Returns : Bio::Range representing the current range of this contig,
228 start and end of the contig can be thus found using:
229 my $start = $contigobj->range()->start();
230 my $end = $contigobj->range()->end();
231 Args : none to get, OR Bio::Range to set
237 return $self->{'_range'} = shift if @_;
238 return $self->{'_range'};
244 Usage : @eclone = $cloneobj->match('exact');
245 @aclone = $cloneobj->match('approximate');
246 @pclone = $cloneobj->match('pseudo');
247 Function: get all matching clones
249 Args : scalar representing the type of clone to be
255 my ($self,$type) = @_;
257 $type = "_match" . lc(substr($type, 0, 1));
258 return @
{$self->{$type} || []};
264 Function: Synonym of the match() method.
268 *each_match
= \
&match
;
273 Usage : $clone->set_match($type,$values);
274 Function: Set the Matches per type
276 Args : type (one of 'exact' 'approx' 'pseudo')
277 array ref of match values
282 my ($self,$type,$val) = @_;
283 $type = "_match" . lc(substr($type, 0, 1));
284 $self->{$type} = $val;
290 Usage : $clonegel = $cloneobj->gel();
291 Function: Get/set the gel number for this clone
292 Returns : scalar representing the gel number of this clone
293 Args : none to get, OR string to set
299 return $self->{'_gel'} = shift if @_;
300 return $self->{'_gel'};
306 Usage : $cloneremark = $cloneobj->remark();
307 Function: Get/set the remark for this clone
308 Returns : scalar representing the current remark of this clone
309 Args : none to get, OR string to set
315 return $self->{'_remark'} = shift if @_;
316 return $self->{'_remark'};
322 Usage : $clonefpnumber = $cloneobj->fp_number();
323 Function: Get/set the fp number for this clone
324 Returns : scalar representing the fp number of this clone
325 Args : none to get, OR string to set
331 return $self->{'_fpnumber'} = shift if @_;
332 return $self->{'_fpnumber'};
337 Title : sequence_type
338 Usage : $cloneseqtype = $cloneobj->sequence_type();
339 Function: Get/set the sequence type for this clone
340 Returns : scalar representing the sequence type of this clone
341 Args : none to get, OR string to set
347 return $self->{'_sequencetype'} = shift if @_;
348 return $self->{'_sequencetype'};
351 =head2 sequence_status
353 Title : sequence_status
354 Usage : $cloneseqstatus = $cloneobj->sequence_status();
355 Function: Get/set the sequence status for this clone
356 Returns : scalar representing the sequence status of this clone
357 Args : none to get, OR string to set
361 sub sequence_status
{
363 return $self->{'_sequencestatus'} = shift if @_;
364 return $self->{'_sequencestatus'};
370 Usage : $clonefpcremark = $cloneobj->fpc_remark();
371 Function: Get/set the fpc remark for this clone
372 Returns : scalar representing the fpc remark of this clone
373 Args : none to get, OR string to set
379 return $self->{'_fpcremark'} = shift if @_;
380 return $self->{'_fpcremark'};
386 Usage : @clonebands = $cloneobj->bands();
387 Function: Get/set the bands for this clone
388 Returns : liat representing the band of this clone, if
389 readcor = 1 while creating the MapIO object and the
391 Args : none to get, OR string to set
397 return $self->{'_bands'} = shift if @_;
398 return $self->{'_bands'};
404 Usage : $cloneobj->group($chrno);
405 Function: Get/set the group number for this clone.
406 This is a generic term, used for Linkage-Groups as well as for
408 Returns : scalar representing the group number of this clone
409 Args : none to get, OR string to set
415 return $self->{'_group'} = shift if @_;
416 return $self->{'_group'};
422 Usage : my $ctg = $cloneobj->contigid();
423 Function: Get/set the contig this clone belongs to
424 Returns : scalar representing the contig
425 Args : none to get, OR string to set
431 $self->{'_contig'} = shift if @_;
432 return $self->{'_contig'} || 0;
437 Title : each_markerid
438 Usage : @markers = $cloneobj->each_markerid();
439 Function: retrieves all the elements in a map unordered
440 Returns : list of strings (ids)
443 *** This only supplies the ids set with the set_markers method ***
444 *** It has nothing to do with actual Bio::Map::MarkerI objects ***
449 my ($self,$value) = @_;
450 return @
{$self->{"_markers"}};
456 Usage : $obj->set_markers($newval)
457 Function: Set list of Marker ids (arrayref)
459 Args : arrayref of strings (ids)
461 *** This only sets a list of ids ***
462 *** It has nothing to do with actual Bio::Map::MarkerI objects ***
467 my ($self,$markers) = @_;
468 if( defined $markers && ref($markers) =~ /ARRAY/ ) {
469 $self->{'_markers'} = $markers;