[Bioperl-l] Glyph question

Lincoln Stein lstein at cshl.edu
Thu May 5 12:41:41 EDT 2005


Hi Olly,

Do you want the subfeatures to appear at all, or just suppress them?  If you 
just want to suppress them, then it is easy to subclass the transcript glyph 
--- you can do it in the same file as your main script if you like:

package Bio::Graphics::Glyph::mytranscript;

use base 'Bio::Graphics::Glyph::transcript';

sub _subseq {  # override the method that produces subparts
	my $self = shift;
	my $feature = shift;
	my @subseq = $self->SUPER::_subseq($feature);
	return grep {$_->primary_tag eq 'exon'} @subseq;
}

Then refer to the glyph named "mytranscript".

Alternatively there is a new glyph named "processed_transcript" that -- I 
think -- will only display subfeatures of type "exon", "CDS" and "UTR". I 
haven't tested it with other types of subfeatures, however, so I might be 
wrong.

Lincoln

On Thursday 05 May 2005 08:35, Oliver Burren wrote:
> Hi Developers,
>
> I'm trying to render some transcripts and I'm using objects in
> Bio::SeqFeature::Gene as well as Bio::Graphics::Panel and Glyph.
>
> I have added some subfeatures (Of type SeqFeature::Generic) to the exon
> objects that exist within these transcripts. Unfortunately when I render
> using the Bio::Graphics::Glyph::transcript glyph it treats these
> seqfeatures as exons so I get an odd transcript out. Is there anyway
> without creating a custom glyph to get Bio::Graphics::Glyph::transcript
> to use only exon subFeatures when rendering ?
>
> I'm using bioperl 1.4
>
> Thanks very much
>
> Olly Burren
>
> _______________________________________________
> 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