[Bioperl-l] (Simple)Align

Bernd Web bernd.web at gmail.com
Sun May 20 14:56:07 UTC 2007


Hi

I have made a simple add_columns function in SimpleAlign along the
lines of remove_columns. I only need to insert characters that are the
same for all sequences:

=head2 add_columns

 Title     : add_columns
  Usage     : $aln2 = $aln->add_columns([0, 10, '.'], [12, 15])
  Function  : Creates an alignment with columns added by specifying
the columns by number and supplying the character (optional) to insert
in all sequences. Default character is gap_char.
  Returns   : Bio::SimpleAlign object
  Args      : Array ref where the referenced array contains a pair of
integers that
             that specify a column range and optionally the character to insert.
             The first column is 0.

=cut

The functionalilty could be extended:
- possibility to supply a string to insert (for all sequences)
- possibility to define the string to insert on a per sequence basis
(although this may be more transparant to do outside SimpleAlign).

After some final checks I could supply it (e.g. via bugzilla).


Regards,
Bernd


On 5/17/07, Jason Stajich <jason at bioperl.org> wrote:
> not yet - when I did this to insert intron positions I just manipulated the
> sequence strings outside of SimpleAlign, but I think it would be nice to
> have an insert function.
>
> -jason
>
> On May 17, 2007, at 3:48 AM, Bernd Web wrote:
>
> Hi,
>
> I am playing with alignment and would like to insert strings at
> certain columns (so in all sequences in the alignment). I know about
> the slice and remove_columns.
> Is there already an insert_columns type of functionality?
> Otherwise I'll just iterate over the sequences similar to
> remove_columns (and give it a try to implement add_columns like
> remove_columns).
>
>
> Regards
> Bernd
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> --
> Jason Stajich
> jason at bioperl.org
> http://jason.open-bio.org/
>
>
>



More information about the Bioperl-l mailing list