[Bioperl-l] poblems with object's locations
Sergiy Ivakhno
ivahser at i.com.ua
Thu Jul 10 08:25:12 EDT 2003
Greetings
I was trying to run the program on BioPerl 1.2.1 which I've installed today
( installation went well ) using modules Bio::Seq and Bio::SeqIO but the Perl5.8 gives an error massage
Can't locate object method "new" via package "Bio::SegIO" (perhaps you forgot to load "Bio::SegIO"?) at 1.pl line 5.
I tried to specify exact pass to library through lib pragma but it doesn't work .
Maybe I missed something ,I'm only beginner.
Below I appended the code .Thank you in advance for you suggestions .
Sergiy.
use Bio::Seq;
use Bio::SeqIO;
use lib '/usr/lib/perl5/site_perl/5.8.0/Bio/SeqIO';
use lib '/usr/lib/perl5/site_perl/5.8.0/Bio/Seq';
$seqin = Bio::SegIO->new( -format =>'EMBL',-file=>'record.EMBL');
$seqout = Bio::SeqIO->new( -format => 'Fasta', -file => '>output.fa');
while ( my $seqobj->next_seq()){
print "Seen sequence",$seqobj->display_id,"start of seq",
substr($seqobj->seq,1,10),"\n";
if ($seqobj->moltipe eq "dna") {
$rev=$seqobj->revcom();
$id = $seqobj->display_id();
$id="$id.rev";
$rev->display_id($id);
$seqout->write_seq($rev);
}
foreach $feat ($seqobj->top_SeqFeature()){
if ($feat->primary_tag eq 'exon')
{ print STDOUT "Location",$feat->start,":",
$feat->end,"CFF[".feat->gff_string,"]\n";
}}
}
More information about the Bioperl-l
mailing list