BioPerl
view release on metacpan or search on metacpan
Bio/Map/Clone.pm view on Meta::CPAN
Title : new
Usage : my $clone = Bio::Map::Clone->new
(
-name => $clone,
-markers => \@markers,
-contig => $contig,
-type => $type,
-bands => $bands,
-gel => $gel,
-group => $group,
-remark => $remark,
-fpnumber=> $fp_number,
-sequencetype => $seq_type,
-sequencestatus=> $seq_status,
-fpcremark => $fpc_remark,
-matche => \@ematch,
-matcha => \@amatch,
-matchp => \@pmatch,
-range => Bio::Range->new(-start => $startrange,
-end => $endrange)
);
Function: Initialize a new Bio::Map::Clone object
Most people will not use this directly but get Clones
through L<Bio::MapIO::fpc>
Returns : L<Bio::Map::Clone> object
Args : -name => marker name string,
-markers => array ref of markers,
-contig => contig name string,
-type => type string,
-bands => band string,
-gel => gel string,
-group => group name string,
-remark => remark string,
-fpnumber=> FP number string,
-sequencetype => seq type string,
-sequencestatus=> seq status string,
-fpcremark => FPC remark,
-matche => array ref,
-matcha => array ref,
-matchp => array ref,
-range => L<Bio::Range> object,
=cut
sub new {
my ($class,@args) = @_;
my $self= $class->SUPER::new(@args);
my ($name,$markers,$contig,$type,$bands,$gel,$group,
$remark,$fpnumber,$seqtype,$seqstatus,$fpcremark,
$matche,$matcha,$matchp,
$range) = $self->_rearrange([qw(NAME MARKERS CONTIG TYPE
BANDS GEL GROUP REMARK FPNUMBER
SEQUENCETYPE SEQUENCESTATUS
FPCREMARK MATCHE MATCHA MATCHP
RANGE)],@args);
$self->name($name) if defined $name;
$self->markers($markers) if defined $markers;
$self->contigid($contig) if defined $contig;
$self->type($type) if defined $type;
$self->bands($bands) if defined $bands;
$self->gel($gel) if defined $gel;
$self->group($group) if defined $group;
$self->remark($remark) if defined $remark;
$self->fp_number($fpnumber) if defined $fpnumber;
$self->sequence_type($seqtype) if defined $seqtype;
$self->sequence_status($seqstatus) if defined $seqstatus;
$self->fpc_remark($fpcremark) if defined $fpcremark;
$self->range($range) if defined $range;
$self->set_match('approx', $matcha) if defined $matcha;
$self->set_match('pseudo', $matchp) if defined $matchp;
$self->set_match('exact', $matche) if defined $matche;
return $self;
}
=head1 Access Methods
These methods let you get and set the member variables
=head2 name
Title : name
Usage : my $name = $cloneobj->name();
Function: Get/set the name for this Clone
Returns : scalar representing the current name of this clone
Args : none to get, OR string to set
=cut
sub name {
my ($self) = shift;
return $self->{'_name'} = shift if @_;
return $self->{'_name'};
}
=head2 type
Title : type
Usage : my $type = $cloneobj->type();
Function: Get/set the type for this clone
Returns : scalar representing the current type of this clone
Args : none to get, OR string to set
=cut
sub type {
my ($self) = shift;
return $self->{'_type'} = shift if @_;
return $self->{'_type'};
}
=head2 range
Title : range
Usage : my $range = $cloneobj->range();
Function: Get/set the range of the contig that this clone covers
Returns : Bio::Range representing the current range of this contig,
Bio/Map/Clone.pm view on Meta::CPAN
=cut
sub sequence_status {
my ($self) = shift;
return $self->{'_sequencestatus'} = shift if @_;
return $self->{'_sequencestatus'};
}
=head2 fpc_remark
Title : fpc_remark
Usage : $clonefpcremark = $cloneobj->fpc_remark();
Function: Get/set the fpc remark for this clone
Returns : scalar representing the fpc remark of this clone
Args : none to get, OR string to set
=cut
sub fpc_remark {
my ($self) = shift;
return $self->{'_fpcremark'} = shift if @_;
return $self->{'_fpcremark'};
}
=head2 bands
Title : bands
Usage : @clonebands = $cloneobj->bands();
Function: Get/set the bands for this clone
Returns : liat representing the band of this clone, if
readcor = 1 while creating the MapIO object and the
.cor exists
Args : none to get, OR string to set
=cut
sub bands {
my ($self) = shift;
return $self->{'_bands'} = shift if @_;
return $self->{'_bands'};
}
=head2 group
Title : group
Usage : $cloneobj->group($chrno);
Function: Get/set the group number for this clone.
This is a generic term, used for Linkage-Groups as well as for
Chromosomes.
Returns : scalar representing the group number of this clone
Args : none to get, OR string to set
=cut
sub group {
my ($self) = shift;
return $self->{'_group'} = shift if @_;
return $self->{'_group'};
}
=head2 contigid
Title : contigid
Usage : my $ctg = $cloneobj->contigid();
Function: Get/set the contig this clone belongs to
Returns : scalar representing the contig
Args : none to get, OR string to set
=cut
sub contigid {
my ($self) = shift;
$self->{'_contig'} = shift if @_;
return $self->{'_contig'} || 0;
}
=head2 each_markerid
Title : each_markerid
Usage : @markers = $cloneobj->each_markerid();
Function: retrieves all the elements in a map unordered
Returns : list of strings (ids)
Args : none
*** This only supplies the ids set with the set_markers method ***
*** It has nothing to do with actual Bio::Map::MarkerI objects ***
=cut
sub each_markerid {
my ($self,$value) = @_;
return @{$self->{"_markers"}};
}
=head2 set_markers
Title : markers
Usage : $obj->set_markers($newval)
Function: Set list of Marker ids (arrayref)
Returns : None
Args : arrayref of strings (ids)
*** This only sets a list of ids ***
*** It has nothing to do with actual Bio::Map::MarkerI objects ***
=cut
sub set_markers {
my ($self,$markers) = @_;
if( defined $markers && ref($markers) =~ /ARRAY/ ) {
$self->{'_markers'} = $markers;
}
}
1;
( run in 1.050 second using v1.01-cache-2.11-cpan-5735350b133 )