Skip to content

Bio::PrimarySeq->subseq() when called with -replace_with doesn't update length #405

@kprokopiou

Description

@kprokopiou

The following code snippet shows that if Bio::PrimarySeq->subseq() is called with a replacement sequence, it doesn't update the sequence to adapt to a change in its length after the subsequence is replaced.
my $s = Bio::PrimarySeq->new( -seq => "ABBBA" );
print "Initial sequence: " . $s->seq . "; len: " . $s->length ."\n";
$s->subseq(2,4, 0, "CCCCCCC" );
print "Modified sequence: " . $s->seq . "; len: " . $s->length ."\n";

The output is:
Initial sequence: ABBBA; len: 5
Modified sequence: ACCCCCCCA; len: 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions