[Bioperl-l] confused by Bio::Graphics
Fairley, Derek
Derek.Fairley at bll.n-i.nhs.uk
Mon Dec 4 10:18:37 UTC 2006
Richard,
You can find instructions for installing the example scripts directory
here:
http://www.bioperl.org/wiki/Installing_Bioperl_for_Unix#INSTALLING_BIOPE
RL_SCRIPTS
or you can get individual scripts from here:
http://www.bioperl.org/wiki/Bioperl_scripts11
Derek.
-----Original Message-----
From: bioperl-l-bounces at lists.open-bio.org
[mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of richard
Sent: 03 December 2006 21:38
To: Bioperl list
Subject: [Bioperl-l] confused by Bio::Graphics
Hi all,
I'm having a little trouble getting Bio::Graphics to give me the correct
output and I'm looking for some help. I am trying to extend from example
5 of
the Graphics HOWTO on the bioperl wiki using version 1.4 of Bioperl.
Eventually I intend the script to follow example 6 but I thought I'd try
the
simpler version first.
The basic aim of the script is that it takes as input a file containing
a list
of GenBank IDs plus some other info for alternative transcripts of a
gene.
This information is stored in a hash and the GenBank IDs are used to
retrieve
the appropriate entries from GenBank. I then want to use Bio::Graphics
to
generate a figure from the feature tables showing the CDSs from the
alternative transcripts.
So far I have managed to retrieve the GenBank entries extract the
feature
tables and store a reference to these in the hash mentioned above. I've
also
got Bio::Graphics to draw a basic image but some of the details aren't
right
and I don't understand why. I have attached the code I have so far, the
input
file and the output image to this mail. I didn't want to display it all
in
the main message but I'm not actually sure which bit is causing the
problem.
The code is very rough and in need of polishing but I need to get it to
work
correctly first.
These are the problems:
1) As I understand it this:
my $wholeseq = Bio::SeqFeature::Generic->new (
-start => 1,
-end => $refseq->length,
-display_name =>$refseq->display_name
);
should display the name of the gene (CD133/Prominin1) near the top of
image.
It doesn't, am I misunderstanding or is there an error in the code?
2) In the quoted example the CDS is broken up into smaller regions which
are
then linked together in example 6. This isn't happening in my code and I
think it should be, I get one solid block for the CDS. I don't
understand why
this is because I'm not clear which parts of the feature table are used
to
define where the CDS should be split. I think this is the relevant bit
of
code:
foreach my $alt_trans (keys %main) {
foreach my $tag (keys %{ $main{$alt_trans}{'features'} }) {
my $feature = $main{$alt_trans}{'features'}{$tag};
$panel->add_track($feature,
-glyph => 'generic',
-bgcolor => $colors[$idx++ % @colors],
-fgcolor => 'black',
-font2color => 'black',
-key => $alt_trans,
-bump => +1,
-height => 8,
-label => 1,
-description => 1,
) if ($tag eq 'CDS');
}
}
Can anyone tell me what I am doing wrong?
RefSeq entry for the gene of interest is here:
http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&val=5174386
If I understand correctly the example file used in the HOWTO is this
gene:
http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&val=1168053
20
Final question, does bioperl come with example scripts and is so where
whould
they normally be found on a Linux system?
If anyone is still reading this thanks for your patience. Any
clarification
will be appreciated.
regards,
Richard
More information about the Bioperl-l
mailing list