From df70bdc6b0fef0740cf3d2a0c71eff3db517358f Mon Sep 17 00:00:00 2001 From: Brian Osborne Date: Thu, 2 Jan 2014 11:54:06 -0500 Subject: [PATCH] Minor edit, die message --- Bio/PrimarySeq.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Bio/PrimarySeq.pm b/Bio/PrimarySeq.pm index 5f4a5d409..8a4045423 100644 --- a/Bio/PrimarySeq.pm +++ b/Bio/PrimarySeq.pm @@ -470,13 +470,12 @@ sub subseq { Title : length Usage : $len = $seqobj->length(); Function: Get the stored length of the sequence in number of symbols (bases - or amino acids). + or amino acids). In some circumstances, you can also set this attribute: - In some circumstances, you can also set this attribute: - 1/ For empty sequences, you can set the length to anything you want: + 1. For empty sequences, you can set the length to anything you want: my $seqobj = Bio::PrimarySeq->new( -length => 123 ); my $len = $seqobj->len; # 123 - 2/ To save memory when using very long sequences, you can set the + 2. To save memory when using very long sequences, you can set the length of the sequence to the length of the sequence (and nothing else): my $seqobj = Bio::PrimarySeq->new( -seq => 'ACGT...' ); # 1 Mbp sequence @@ -497,8 +496,7 @@ sub length { if (defined $val) { my $len = $self->{'length'}; if ($len && ($len != $val)) { - $self->throw("You're trying to lie about the length: ". - "is $len but you say ".$val); + $self->throw("Can not set the length to $val, current length value is $len"); } $self->{'length'} = $val; $self->{'_freeze_length'} = undef; -- 2.11.4.GIT