[Bioperl-l] about the gc% plotting
Paul Edlefsen
pedlefsen at systemsbiology.org
Thu Feb 27 10:33:12 EST 2003
In case this helps, I've thought that I had a bug and then realized that
my dna was all Ns. If it's all Ns you won't see a line because the gc
content is 0%.
:Paul
Lincoln Stein wrote:
>Hi,
>
>Enclosed is a script and its output that demonstrates how to use the GC
>plotting. I don't know why your script didn't produce the expected output,
>except that possibly you didn't quote the color names (e.g. green rather than
>'green') and maybe the histogram line came out white on white.
>
>Lincoln
>
>
>On Wednesday 26 February 2003 08:34 am, Magic Fang wrote:
>
>
>>What the $seq must be? Does it needs a feature descripts the gc% when i
>>want to plot gc%? I just got an axis of gc% figure, no gc% line. And then
>>my codes are: $generic=Bio::SeqFeature::Generic->new(-start=>1,
>> -end=>$seq->length,
>> -seq_id=>$seq->display_name);
>>$generic->attach_seq($seq);
>>.....
>>$panel->add_track($generic,
>> -glyph=>'dna',
>> -height=>100,
>> -fgcolor=>blue,
>> -axis_color=>purple,
>> -bgcolor=>green,
>> -linewidth=>3,
>> -outlinecolor=>red);
>>Can anybody tell me why? And another thing is if we can not use
>>Bio::Graphics::Glyph::dna etc. directly? Magic Fang
>>
>>_______________________________________________
>>Bioperl-l mailing list
>>Bioperl-l at bioperl.org
>>http://bioperl.org/mailman/listinfo/bioperl-l
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
>------------------------------------------------------------------------
>
>#!/usr/bin/perl
>
>use lib '.';
>use strict;
>
>use Bio::SeqFeature::Generic;
>use Bio::Seq;
>use Bio::Graphics;
>
>my $dna = generate_dna(5000);
>my $seq = Bio::Seq->new(-display_id => 'Fred',
> -seq => $dna);
>
>my $generic=Bio::SeqFeature::Generic->new(-start => 1,
> -end => $seq->length,
> -seq_id => $seq->display_name);
>$generic->attach_seq($seq);
>
>my $panel = Bio::Graphics::Panel->new(-width=>600,-segment=>$seq);
>$panel->add_track('arrow'=>$generic,
> -tick => 2);
>
>$panel->add_track($generic,
> -glyph=>'dna',
> -height=>100,
> -fgcolor=>'blue',
> -axis_color=>'purple',
> -bgcolor=>'green',
> -linewidth=>3,
> -outlinecolor=>'red');
>
>print $panel->png;
>
>
>sub generate_dna {
> my $length = shift;
> my $dna;
> for (1..$length) {
> $dna .= (qw(g a t c))[rand 4];
> }
> $dna;
>}
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l at bioperl.org
>http://bioperl.org/mailman/listinfo/bioperl-l
>
>
--
Paul T. Edlefsen Software Engineer
<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>
The Institute for Systems Biology
1441 North 34th Street
Seattle, Washington 98103-8904
<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>
Email: paul at systemsbiology.org
Phone: (206)732-1336
Fax: (206)732-1260
More information about the Bioperl-l
mailing list