Introduction to bioperl

47
Introduction to bioperl

description

Introduction to bioperl. What is perl?. Production Engineering Research Laboratory Practically Everything Really Likeable Pre-positioned Equipment Requirement List Principal Exchange Rate Linked Pathologically Eclectic Rubbish Lister Practical Extraction and Report Language. - PowerPoint PPT Presentation

Transcript of Introduction to bioperl

Page 1: Introduction to bioperl

Introduction to bioperl

Page 2: Introduction to bioperl

What is perl?

Production Engineering Research LaboratoryPractically Everything Really LikeablePre-positioned Equipment Requirement ListPrincipal Exchange Rate LinkedPathologically Eclectic Rubbish ListerPractical Extraction and Report Language

Page 3: Introduction to bioperl

Perl is– Practical Extraction and Report Language (or

Pathologically Eclectic Rubbish Lister) (written by Larry Wall in 1986)

– An interpreted programming language that resembles both a real programming language and a shell

– A language for easily manipulating text, files, and processes

– Providing more concise and readable way to do jobs formerly accomplished using C or shells.

What is perl, really?

Page 4: Introduction to bioperl

0’s and 1’sLow-level language, assemble

needed

High-level language, compilation needed

High-level language, compilation NOT needed

Page 5: Introduction to bioperl

Why use Perl?

• Easy to use– Basic syntax is C-like– Lazy memory management– A small amount of code goes a long way

• Fast– Perl has numerous built-in optimization features which

makes it run faster than other scripting language.

• Portability– One script version runs everywhere (unmodified).

Page 6: Introduction to bioperl

Why use Perl?

• Efficiency– More efficient than C to perform the same task

• Correctness– Perl fully parses and pre-”compiles” script before

execution.

• Free to use– Comes with source code

Page 7: Introduction to bioperl

To learn perl

• Ian Holford’s perl class

• Reading books– “Learning Perl, 5th Edition” by Randal Schwartz, Tom

Phoenix, and brian d foy

– “Programming Perl (3rd Edition)” by Larry Wall, tom Christiansen, and Jon Orwant

• Reading perl documentations

• Practice, practice, practice……

Page 8: Introduction to bioperl

What’s Bioperl?

• Bioperl is not a new language

• It is a collection of Perl modules that facilitate the development of Perl scripts for bioinformatics applications.

Page 9: Introduction to bioperl

Perls script

Perl Interpreter

Perl Modules

Bioperl Modules

output

input

Bioperl and Perl

Page 10: Introduction to bioperl

Why bioperl for bioinformatics?

• Perl is good at file manipulation and text processing, which make up a large part of the routine tasks in bioinformatics.

• Perl language, documentation and many Perl packages are freely available.

• Perl is easy to get started in, to write small and medium-sized programs.

Page 11: Introduction to bioperl

Bioperl Project

• It is an international association of developers of open source Perl tools for bioinformatics, genomics and life science research

• Started in 1995 by a group of scientists tired of rewriting BLAST and sequence parsers for various formats

• Version 0.7 was released in 2000• Bioperl 1.0 was released in 2002• A paper about bioperl was published in October 2002 (Satjich

et al., 2002. The bioperl toolkit: perl modules for the life sciences. Genome Research 12: 1611-1618.)

• Current stable release 1.6.0 was made available in January 2009

Page 12: Introduction to bioperl

Bioperl toolkit• Core package (bioperl-live)

– THE basic package and it’s required by all the other packages• Run package (bioperl-run)

– Providing wrappers for executing some 60 common bioinformatics applications

• DB package (bioperl-db)– Subproject to store sequence and annotation data in a BioSQL

relational database• Network package (bioperl-network)

– Parses and analyzes protein-protein interaction data• Dev package (bioperl-dev)

– New and exploratory bioperl development

Page 13: Introduction to bioperl

Installing bioperl on a Windows computer

• On Windows– Install ActivePerl

– Install bioperl using PPM (Perl Package Manager)

• On cygwin (Linux-like environment in Windows)– Install cygwin

– Install required perl modules

– Install bioperl using source code

Route 1

Route 2

Page 14: Introduction to bioperl

Installing bioperl on a Windows computer

• On Windows– Install ActivePerl

– Install bioperl using PPM (Perl Package Manager)

• On cygwin (Linux-like environment in Windows)– Install cygwin

– Install required perl modules

– Install bioperl using source code

Route 1

Route 2

Page 15: Introduction to bioperl

Installing bioperl on WindowsRoute 1

Page 16: Introduction to bioperl

Installing bioperl on WindowsRoute 1

Page 17: Introduction to bioperl

Installing bioperl on WindowsRoute 1

Following the instructions

Page 18: Introduction to bioperl

• Easy installation process

• Works well

• No good if to parse the results of other linux-base applications

• Not recommended

Installing bioperl on WindowsRoute 1

Page 19: Introduction to bioperl

Installing bioperl on a Windows computer

• On Windows– Install ActivePerl

– Install bioperl using PPM (Perl Package Manager)

• On cygwin (Linux-like environment in Windows)– Install cygwin

– Install required perl modules

– Install bioperl using source code

Route 1

Route 2

Page 20: Introduction to bioperl

Where to get bioperlwww.bioperl.org

http://www.bioperl.org

Page 21: Introduction to bioperl
Page 22: Introduction to bioperl
Page 23: Introduction to bioperl
Page 24: Introduction to bioperl

Small size

Page 25: Introduction to bioperl

~ stands for the home directoryTo move one level up to the parental directory

The parental directory is /home

Page 26: Introduction to bioperl

There is one folder “XiaodongBai” in /home

Attributes :First position:- regular filed directory (folder)l link

Other positions:- not (readable|writeable|executable)r readablew writeablex executable

Page 27: Introduction to bioperl

Make a directory called “programs”

Now there are 2 folders in /home

Page 28: Introduction to bioperl

Change directory to “programs”

Location of the downloaded bioperl file

Page 29: Introduction to bioperl

gunzip -c /cygdrive/f/Downloads/BioPerl-1.6.0.tar.gz | tar -xvf -

Commands to decompress and untar the bioperl file

Page 30: Introduction to bioperl

All bioperl files are in this folder now

Page 31: Introduction to bioperl

Change directory to “BioPerl-1.6.0”

All the files in the directory

Read “INSTALL” for detailed instructions when you have time

Page 32: Introduction to bioperl

perl Makefile.PL

Check prerequisites required for bioperl installation

Press “return” to accept the default “yes” and continue.

Page 33: Introduction to bioperl

Press “return” to accept the default “yes” and continue.

Page 34: Introduction to bioperl

Prerequisites were installed successfully.Enter “a” and press “enter” to accept the default option and continue.

Press “enter” for all questions along with way

Page 35: Introduction to bioperl

Information about the installation of prerequisites

Ignore the errors for now since these modules are optional

Press “return” to accept the default options and continue.

Page 36: Introduction to bioperl

First step done!

Type “make” and press “enter” to start building

Page 37: Introduction to bioperl

Second step done!

Type “make test” and press “enter” to start testing

Page 38: Introduction to bioperl

Testing in progress…

Page 39: Introduction to bioperl

All tests are passed!

Ignore any non-passed tests for now!

Type “make install” and press “enter” to start installing

Page 40: Introduction to bioperl

Bioperl is successfully installed!

Congratulations!

Page 41: Introduction to bioperl

Time to run a test to seewhether bioperl works

Page 42: Introduction to bioperl

Type “clear” and press “return” to clear the screen

Page 43: Introduction to bioperl

Use “cp” command to copy the test script “bioperl_installation_test.pl” to the current directory (.)

Page 44: Introduction to bioperl

Check if the file is executable.

If not,type “chmod +x bioperl_installation_test.pl” and press “enter”.

Check it again to make sure that it is executable.

Page 45: Introduction to bioperl

To run a perl script, type$./bioperl_installation_test.pl

Or$perl bioperl_installation_test.pl

Page 46: Introduction to bioperl

If you see “It works!!”, it works!

If you see something else, the installation failed in the sense that the modules are not being loaded correctly.See the instructors for troubleshooting individually.

Page 47: Introduction to bioperl

Bioperl reading materials

• Bioperl tutorial: http://www.bioperl.org/wiki/Bptutorial.pl

• HOW-TOs http://www.bioperl.org/wiki/HOWTOs

• Example code, in the scripts/ and examples/ directories of a bioperl installation

• Online course written at the Pasteur Institute. http://www.pasteur.fr/recherche/unites/sis/formation/bioperl.