请问下面的 return $self->{'_start'};处的_start?谢谢!
时间:2011-03-21
来源:互联网
请问下面的 return $self->{'_start'};处的_start怎么这么方便就表示找到start了???是不是其他地方还有代码表示怎么找出start???谢谢!!
=head2 new()
new() initializes the attributes:
_transcript_array
_transcriptID_array
_start
_end
=cut
sub new {
my ($class,$whatever)=@_;
if (ref($class)){
$class = ref($class);
}
my $self = {};
bless($self,$class);
if ($whatever){
$self->throw( "Can't pass an object to new() method. Use put_Genes() to include Bio::EnsEMBL::Gene in cluster");
}
return $self;
}
#########################################################################
=head1 Range-like methods
Methods start and end are typical for a range. We also implement the boolean
and geometrical methods for a range.
=head2 start()
Title : start
Usage : $start = $transcript_cluster->end();
Function: get/set the start of the range covered by the cluster. This is re-calculated and set everytime
a new transcript is added to the cluster
Returns : a number
Args : optionaly allows the start to be set
=cut
sub start{
my ($self,$start) = @_;
if ($start){
$self->throw( "$start is not an integer") unless $start =~/^[-+]?\d+$/;
$self->{'_start'} = $start;
}
return $self->{'_start'};
}
=head2 new()
new() initializes the attributes:
_transcript_array
_transcriptID_array
_start
_end
=cut
sub new {
my ($class,$whatever)=@_;
if (ref($class)){
$class = ref($class);
}
my $self = {};
bless($self,$class);
if ($whatever){
$self->throw( "Can't pass an object to new() method. Use put_Genes() to include Bio::EnsEMBL::Gene in cluster");
}
return $self;
}
#########################################################################
=head1 Range-like methods
Methods start and end are typical for a range. We also implement the boolean
and geometrical methods for a range.
=head2 start()
Title : start
Usage : $start = $transcript_cluster->end();
Function: get/set the start of the range covered by the cluster. This is re-calculated and set everytime
a new transcript is added to the cluster
Returns : a number
Args : optionaly allows the start to be set
=cut
sub start{
my ($self,$start) = @_;
if ($start){
$self->throw( "$start is not an integer") unless $start =~/^[-+]?\d+$/;
$self->{'_start'} = $start;
}
return $self->{'_start'};
}

TranscriptCluster.zip (3.69 KB)
作者: havocor 发布时间: 2011-03-21
那个 $self->{_start} 的值不就是传入 sub start 的参数
作者: zhlong8 发布时间: 2011-03-21
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28