[Bioperl-l] again on remove gapped columns

Jer-Ming Chia jerm at gmx.net
Wed May 12 06:58:35 EDT 2004

The option for removing all-gaps columns was recently added into 

=head2 remove_gaps

  Title     : remove_gaps
  Usage     : $aln2 = $aln->remove_gaps('-'[,$all_gaps_columns])
  Function  : Creates an aligment with gaps removed
  Returns   : a Bio::SimpleAlign object
  Args      : a gap character(optional) if no specified,
              taken from $self->gap_char, optional $all_gaps_columns flag
                         indicates that only all-gaps columns should be 


so check which bioperl release you have (you may need to grab it from 
the live branch), and try:

my $aln_nogaps = $aln = $aln->remove_gaps('-',1);


On 12 May 2004, at 17:18, luisa pugliese wrote:

> Hi,
> many thanks to everybody who reply to my message. I tryed your 
> suggestions
> and I found the both:
> $aln->remove_gaps and $aln->remove_columns(['gaps']), remove all the 
> columns
> where in one sequence there is a gap and if in the other sequence 
> there are
> no gaps, the aa or nucleotides are removed. This changes the alignment 
> and
> of course it is not what I want. Does anybody have any other suggestion
> other than reading the alignment files with another program and 
> writing them
> out (I already tryed this with AlignIO and it doesn't work)?
> Best regards
> Luisa
> =============================
> Luisa Pugliese, Ph.D.
> luisa.pugliese at safan-bioinformatics.it
> Corso Tazzoli 215/13 -10137 Torino
> tel +39 011 3026230
> cell. +39 333 6130644
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list