#!/usr/bin/perl -w

use Bio::Perl;

# this script will only work if you have an internet connection on the
# computer you're using, the databases you can get sequences from 
# are 'swiss', 'genbank', 'genpept', 'embl', and 'refseq'

$seq = get_sequence('genbank',"AI129902");
write_sequence(">AI129902.genbank",'genbank',$seq);

print "reverse complement : ", revcom_as_string($seq), "\n";

# Pour pouvoir aller plus loin : notation objet possible
print "sequence : ", $seq->seq(), "\n";
print "reverse complement : ", $seq->revcom->seq(), "\n";

print "sequence name is ", $seq->display_id,
    " length is ", $seq->length, "\n";
print "there are ",
      scalar $seq->get_SeqFeatures, 
      " features attached to this sequecnce and ",
      scalar $seq->annotation->get_Annotations('reference'), 
      " reference annotations\n";
