Perl modules

Accessing remote database

use Bio::Perl;
$seqobj = get_sequence(‘swiss’, “ROA1_HUMAN”);
write_sequence(“roa1.fasta”, ‘fasta’, $seqobj);

Databases can be: swiss, genbank, genpept, refseq, etc.

Generating sequence

Contain sequence and annotation

Methods: display_id, desc, seq, revcom, translate, etc. The revcom and translate methods create new Bio::Seq object.

One way to create a Bio::Seq object:

$seq = Bio::Seq->new(-seq => 'actgtggcgtcaact', 
				-desc => 'Sample Bio::Seq object', 
				-display_id => 'something', 
				-accession_number => 'accnum', 
				-alphabet => 'dna' ); 
Another way: read the sequence from file via Bio::SeqIO object.
Table of Contents.
Previous | Next.