[Bioperl-l] problem help me...........please

Chris Fields cjfields at uiuc.edu
Sat May 13 18:18:53 UTC 2006


I really hate to break the bad news here, but I'm going to be brutally
honest.  I have not looked at any of the Bio::Graph modules and have no idea
how they are implemented, and I haven't looked at your input file, but I can
tell right off the bat your script has major logic problems.  I can also
pretty much  tell that you don't understand the object model we use here, at
all.  This is why I say that (from your last response):

> ## no of nodes = Bio::Seq::RichSeq=HASH(0x11aa700) ##
> what this stand for

Did you cut and paste from several other scripts hoping that it would work?
I say that b/c you mix styles quite frequently here, using objects correctly
(deref'ing with '->') and incorrectly (print "$object").  You also declare
(and redeclare) @ISA four times for a script (not needed unless you're
declaring a class and inheriting methods from other modules).  You also use
@ISA once with a misspelled module name (I don't think there is a module
named 'Expoerter').  So, I'm actually stunned that the script doesn't crash
at all.  Yikes!

Okay, brutal honesty time over.  Any time you see something like this:

Bio::Graph::ProteinGraph=HASH(0x1182e70)

means that what you are printing out is an reference to an object (it refers
to the object class and the location in memory) and is NOT what you want.
You should be doing something along the lines of $object->method, not 'print
$object', to get at the object data and methods.  You use this several times
in your script already; that should be a big hint as the areas where it
doesn't work do not use this syntax.  Read the documentation for the many
varied modules you use in your script.  Look at script examples.  Start
simply, then work your way up.  

Also, using the '->' dereferencing operator inside double quotes doesn't
work; you have to do something like:

print $graph->nodes,"\t";

not 

print "$graph->nodes\t";

That's why you get this in your output:

Bio::Graph::ProteinGraph=HASH(0x1182e70)->nodes

Which just prints the object reference with the string '->nodes'.

If any of what I just said doesn't make any sense, you really need to pick
up 'Learning Perl' and 'Intermediate Perl' by Schwartz et al and
'Programming Perl' by Wall et al.  I don't know if anyone can really help at
this point w/o completely writing the script for you.  We will fix problems
to a point but we, for the most part, will not do your work for you.

Chris

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of saurabh maheshwari
> Sent: Saturday, May 13, 2006 12:18 AM
> To: bioperl_l
> Subject: [Bioperl-l] problem help me...........please
> 
> 
> hello
> I am very happy to see the prompt reply from the group members..
> As you all suggested  to attach the required files ..
> So I have attached all the three file first the input file,secod I have
> saved the error I was getting into a error file and third the programme
> file..
> Actully in error file I want to know some thing .
> I am putting here one error line,
> ## no of nodes = Bio::Seq::RichSeq=HASH(0x11aa700) ##
> what this stand for
> Second thing I want to get the connected graph as I have.
> which type of connected grph I explain you by example..
> Let there are five object in such a way.
> A connected to B
> A connected to C
> B connected to C
> D connected to C
> E connected to A
> I want to create a whole link in betwwen all five.
> 
> 
> Please help me I am not getting the result
> 
> 
> with Regards
> 
> SAURABH MAHESHWARI
> 
> M.Sc. (BIOINFORMATICS)
> 
> JAMIA MILLIA ISLAMIA
> 
> NEW DELHI




More information about the Bioperl-l mailing list