[Bioperl-l] xyplot only from numbers?

Smithies, Russell Russell.Smithies at agresearch.co.nz
Wed Oct 15 19:40:41 UTC 2008


Hi Vesko,
I managed to figure out how to draw my xyplot with data from an array of
quality values and I'm sure you'll be able to adapt this example to suit
your needs.
The trick is to add one feature for the xyplot then add_SeqFeature for
each the values you want to use for the plot.

============================================
my $consensus = $contig->get_consensus_sequence();

my @quality_values  = @{$contig->get_consensus_quality()->qual()};

my $consensus_quality_feature = Bio::SeqFeature::Generic->new(
								-start
=> $consensus->start,
								-end
=> $consensus->end,
	
-strand=> $consensus->strand,
	
-display_name => $consensus->display_name,
								);

# add "subfeatures"
for (my $i=1;$i<$#quality_values;$i++) {
	
$consensus_quality_feature->add_SeqFeature(Bio::SeqFeature::Generic->new
(-start=>$i,-end=>$i,-score=>$quality_values[$i]));
}
$panel->add_track( $consensus_quality_feature,
					-glyph => 'xyplot' ,
					-height => 10,
					-graph_type	=> 'boxes',
					-display_name => "Quality",
					);

================================================

Russell


> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org
[mailto:bioperl-l-bounces at lists.open-
> bio.org] On Behalf Of Vesselin Baev
> Sent: Thursday, 16 October 2008 6:32 a.m.
> To: bioperl-l at lists.open-bio.org
> Subject: [Bioperl-l] xyplot only from numbers?
> 
> Dear All,
> if I have only a bunch on numbers, can I use a xyplot to draw a
histogram?
> 
> 
> Vesko
> 
> --
> ------------------------------------------------
> Dr. Vesselin Baev
> Research Assistant Professor
> University of Plovdiv
> Dept. Molecular Biology
> Bioinformatics Group
> Tzar Assen 24
> Plovdiv 4000, BULGARIA
> +359 32 261 (560)
> +359 89 43 80 945
> Skype: vebaev
> vebaev at gmail.com
> baev at uni-plovdiv.bg
> http://plantgene.eu/
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================




More information about the Bioperl-l mailing list