Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Bioperl _ SeqStats

by MVRS (Acolyte)
on Feb 06, 2013 at 05:35 UTC ( #1017336=perlquestion: print w/ replies, xml ) Need Help??
MVRS has asked for the wisdom of the Perl Monks concerning the following question:

i tried running bioperl script to find hydropathicity of a protein sequence , and am unable to fix the error >

Error : Can't use string ("Bio::Tools::SeqStats") as a HASH ref while "strict refs" in use at /usr/share/perl5/Bio/Tools/SeqStats.pm line 726.

#!/usr/bin/perl #use SeqStats; use Data::Dumper; use Bio::SeqIO ; use Bio::Seq ; use Bio::Tools::SeqStats; use Bio::Root::Root; # Calculate mean Kyte-Doolittle hydropathicity (aka "gravy" score) my $prot = Bio::PrimarySeq->new(-seq=>'MSFVLVAPDMLATAAADVVQIGSAVSAGS +',-format => 'Fasta',-alphabet=>'protein', -id=>'test'); $gravy = Bio::Tools::SeqStats->hydropathicity($seqobj); print "might be hydropathic" if $gravy > 1;

Comment on Bioperl _ SeqStats
Download Code
Re: Bioperl _ SeqStats
by vinoth.ree (Prior) on Feb 06, 2013 at 06:25 UTC

    You need to give $prot as argument to the hydropathicity() function as follows,

    my $gravy = Bio::Tools::SeqStats->hydropathicity($prot);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1017336]
Approved by vinoth.ree
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-07-05 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls