1 / 7

Modules

Modules. A Perl module is a self-contained piece of Perl code that can be used by a Perl program or by other Perl modules. It is conceptually similar to a C link library, or a C++ class. http://www.cpan.org/. How to install Modules.

joanne
Download Presentation

Modules

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modules • A Perl module is a self-contained piece of Perl code that can be used by a Perl program or by other Perl modules. It is conceptually similar to a C link library, or a C++ class. • http://www.cpan.org/

  2. How to install Modules • You'll need to switch to your root user. To fire up the CPAN module, just get to your command line and run this: • perl -MCPAN -e shell • If this is the first time you've run CPAN, it's going to ask you a series of questions - in most cases the default answer is fine. Once you find yourself staring at the cpan> command prompt, installing a module is as easy as install MODULE::NAME • cpan> install HTML::Template • Let's say you're on your system command line and you just want to install a module as quickly as possible - you can run the Perl CPAN module via command line perl and get it installed in a single line: • perl -MCPAN -e 'install HTML::Template'

  3. Bioperl Bioperl is a collection of Perl Modules that developed for bioinformatics applicatons

  4. How to install bioperl • Determine the platform: windows vs. unix • Bioperl-I@bioperl.org to ask for help • Getting better with perl

  5. Object-Oriented Programming Use Bio:: Perl $rev_com = revcom($sequence); Vs. $rev_com2 = $seq_obj->revcom;

  6. Sequence Object Methods

  7. Sample script use Bio::Perl; #tell perl which module(library) it should loof for #query swissport database for ROA1 $seq_object = get_sequence(‘genbank’,”ROA1_HUMAN”); write_sequences(“>roa1.fasta”,’fasta’,$seq_object); # uses the default database - nr in this case $blast_result = blast_sequence($seq); write_blast(">roa1.blast",$blast_result);

More Related