[Bioperl-l] Removing seq from SimpleAlign
Jason Stajich
jason at cgt.mc.duke.edu
Tue Mar 4 09:46:32 EST 2003
Why not do:
my @seqs = $aln->each_seq;
foreach my $seq ( @seqs ) {
if( $seq->display_id eq 'ID_I_WANT_TO_MATCH' ||
SOMEOTHERCRITERIAHERE ) {
$aln->remove_seq($seq);
}
}
On Tue, 4 Mar 2003, James Wasmuth wrote:
> Good Afternoon all,
>
> I'm want to remove certain sequences from a multi-sequence alignment
> (msf format, converted from fasta), which is stored as a SimpleAlign object.
>
> I know I'm supposed to use remove_seq() and that the arguement is a
> LocatableSeq object. I create this latter object correctly, it seems,
> awarding it '-id', '-start' & '-end' properties.
>
> However I get the following error; MSG: Could not find the sequence to
> remoce from the start-end list
>
> (typo's not mine! ;o) )
>
> I've looked at the remove_seq code to see what may be wrong.
>
> It meets the "if (exists $self->{'_start_end_lists'}->{$id})" condition
> and the -start and -end properties are coords from the alignment file,
> so I'm clearly not understanding what this start-end list is.
>
> From the alignment file the sequence I'm trying to remove is
> Name: NBC00095_6-157/1-164 Len: 164 Check: 8761 Weight: 1.00
>
> And the LocatableSeq object is
> -id='NBC00095_6-157', -start='1', -end='164'
>
>
> Any pointers?
>
> Many Thanks
> James
>
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list