[Bioperl-l] no revcom method in Bio::Seq module?
chen li
chen_li3 at yahoo.com
Sun May 14 17:14:30 UTC 2006
Hi all,
I need to get a reverse-complemenary sequence out of a
fasta sequence file. And the Synopsis of Bio::Seq
points out I can do like this way:
$revcom=$seqobj->revcom();
I use the following script trying to get the job done
but it doesn't work. Then I read documentation of
Bio::Seq and it looks like it doesn't contain revcom
method.
Any idea will be appreciated.
Li
###############################
Here is the code:
#!c:/perl/bin/perl.exe
use strict;
use warnings;
use Bio::Seq;
use Bio::SeqIO;
my $file='c:/perl/local/primer3_1.0.0/src/est.txt';
my $seqIO=Bio::SeqIO->new(-file=>"<$file",
-format=>'fasta' );
my $seqobj=$seqIO->next_seq();#create object
print "what attributes/keys are available:\n";
for my $key (sort keys %$seqobj){
my $value=$seqobj->{$key};
print "$key\t=>\t$value\n"
}
# These are the output on the screen
#primary_id => gi|54093|emb|X61809.1|
#primary_seq => Bio::PrimarySeq=HASH(0x10492848)
#based on these results primary_id can get
#access right away
# as to primary_seq it is an object in
#Bio::Primaryseq and it provides the following
#methods after reading the documentaion:
#new
#seq
#validate_seq
#subseq
#length
#display_id
#accession_number
#primary_id
#alphabet
#desc
#can_call_new
#id
#is_circular
#object_id
#version
#authority
#namespace
#display_name
#description
print "primary_id=",$seqobj->primary_id, "\n\n";
print "id=",$seqobj->id, "\n\n";
print "revcom=",$seqobj->revcom,"\n\n";
my $now_time=localtime;
print $now_time, "\n\n";
exit;
#These are the output on the screen
#primary_id=gi|54093|emb|X61809.1|
#id=gi|54093|emb|X61809.1
#revcom=Bio::Seq=HASH(0x10493304)
#Sun May 14 12:45:20 2006
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Bioperl-l
mailing list