[Bioperl-l] confused by Bio::Graphics
richard
rbirnie at totalise.co.uk
Sun Dec 3 21:38:02 UTC 2006
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=116805320
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CD133_graphic_code
Type: application/x-perl
Size: 2702 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20061203/d5bd52ae/attachment.pl>
-------------- next part --------------
sequence_ID Exon_Boundary Assay_location Amplicon_length
NM_006017 9 - 10 1118 106
AF027208.1 9 - 10 1118 106
AK027420.1 9 - 10 1312 106
AK027422.1 9 - 10 1334 106
BC012089.1 9 - 10 1289 106
AY449689.1 8 - 9 1054 106
AY449690.1 8 - 9 1054 106
AY449691.1 8 - 9 1054 106
AY449692.1 9 - 10 1081 106
AY449693.1 9 - 10 1081 106
AF507034.1 8 - 9 1091 106
AK075411.1 9 - 10 1289 106
AF117225.1 9 - 10 1334 106
AK226033.1 - 1312 106
DQ895452.1 - 1054 106
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CD133.png
Type: image/png
Size: 4322 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20061203/d5bd52ae/attachment-0004.png>
More information about the Bioperl-l
mailing list