Bioperl Modules
Nixon Mendez
Department of Bioinformatics
• BioPerl is an active open source software project supported by
the Open Bioinformatics Foundation.
• BioPerl is a product of community effort to produce Perl code which is
useful in biology.
• BioPerl is a collection of Perl modules
• It has played an integral role in the Human Genome Project
• Sequence objects
• Alignment objects
• Database searching objects
• They interact with each other
BioPerl
• Object Oriented
• Modules and Objects
• Flexible and Simple
• Deals with Biological Data
• Objects are created by Modules
• Objects are the container of data
Bioperl
Bio::Seq Module
• It is central Module
• Using Bio::Seq module we can create Bio::Seq object
Flavours of Seq objects
- Bio::PrimarySeq
- Bio::SeqFeature
- Bio::Seq
Bio::Seq
Example 1:
use Bio::Seq;
$seq_obj = Bio::Seq->new(-seq => "aaaatgggggggggggccccgtt",
-display_id => "#12345",
-desc => "example 1",
-alphabet => "dna" );
print $seq_obj->seq();
Creating a sequence and an Object
Bio::SeqIO Module
• Handler for SeqIO Formats
• Used for biological file handles
• Read or Write sequences
• Supported formats include fasta, genbank, embl, swiss
(SwissProt), Entrez Gene and tracefile formats such as abi (ABI)
and scf. quence objects
Bio::SeqIO
Example 2:
use Bio::SeqIO;
$seqio_obj = Bio::SeqIO->new(-file => '>sequence.fasta', -format
=> 'fasta' );
Writing a sequence to a file
Example 3:
use Bio::Seq;
use Bio::SeqIO;
$seq_obj = Bio::Seq->new(-seq =>
"aaaatgggggggggggccccgtt",
-display_id => "#12345",
-desc => "example 1",
-alphabet => "dna" );
$seqio_obj = Bio::SeqIO->new(-file => '>sequence.fasta', -
format => 'fasta' );
$seqio_obj->write_seq($seq_obj);
Writing a sequence to a file
Example 4:
use Bio::SeqIO;
$seqio_obj = Bio::SeqIO->new(-file => "sequence.fasta", -format
=> "fasta" );
$seq_obj = $seqio_obj->next_seq;
print $seq_obj->seq,"n";
Retrieving a sequence from a file
Example 5:
use Bio::SeqIO;
$seqio_obj = Bio::SeqIO->new(-file => "sequence.fasta", -format
=> "fasta" );
while ($seq_obj = $seqio_obj->next_seq)
{
print $seq_obj->seq,"n";
}
Retrieving multiple sequence from a
file
THANK YOU

PERL- Bioperl modules

  • 1.
  • 2.
    • BioPerl isan active open source software project supported by the Open Bioinformatics Foundation. • BioPerl is a product of community effort to produce Perl code which is useful in biology. • BioPerl is a collection of Perl modules • It has played an integral role in the Human Genome Project • Sequence objects • Alignment objects • Database searching objects • They interact with each other BioPerl
  • 3.
    • Object Oriented •Modules and Objects • Flexible and Simple • Deals with Biological Data • Objects are created by Modules • Objects are the container of data Bioperl
  • 4.
  • 5.
    • It iscentral Module • Using Bio::Seq module we can create Bio::Seq object Flavours of Seq objects - Bio::PrimarySeq - Bio::SeqFeature - Bio::Seq Bio::Seq
  • 6.
    Example 1: use Bio::Seq; $seq_obj= Bio::Seq->new(-seq => "aaaatgggggggggggccccgtt", -display_id => "#12345", -desc => "example 1", -alphabet => "dna" ); print $seq_obj->seq(); Creating a sequence and an Object
  • 7.
  • 8.
    • Handler forSeqIO Formats • Used for biological file handles • Read or Write sequences • Supported formats include fasta, genbank, embl, swiss (SwissProt), Entrez Gene and tracefile formats such as abi (ABI) and scf. quence objects Bio::SeqIO
  • 9.
    Example 2: use Bio::SeqIO; $seqio_obj= Bio::SeqIO->new(-file => '>sequence.fasta', -format => 'fasta' ); Writing a sequence to a file
  • 10.
    Example 3: use Bio::Seq; useBio::SeqIO; $seq_obj = Bio::Seq->new(-seq => "aaaatgggggggggggccccgtt", -display_id => "#12345", -desc => "example 1", -alphabet => "dna" ); $seqio_obj = Bio::SeqIO->new(-file => '>sequence.fasta', - format => 'fasta' ); $seqio_obj->write_seq($seq_obj); Writing a sequence to a file
  • 11.
    Example 4: use Bio::SeqIO; $seqio_obj= Bio::SeqIO->new(-file => "sequence.fasta", -format => "fasta" ); $seq_obj = $seqio_obj->next_seq; print $seq_obj->seq,"n"; Retrieving a sequence from a file
  • 12.
    Example 5: use Bio::SeqIO; $seqio_obj= Bio::SeqIO->new(-file => "sequence.fasta", -format => "fasta" ); while ($seq_obj = $seqio_obj->next_seq) { print $seq_obj->seq,"n"; } Retrieving multiple sequence from a file
  • 13.