Getting Started

From BioPerl
Jump to: navigation, search

Contents

Download

See Getting BioPerl

Installation

See Installing BioPerl

Quick example

use Bio::Seq;
use Bio::SeqIO;
 
# create a sequence object of some DNA
my $seq = Bio::Seq->new(-id => 'testseq', -seq => 'CATGTAGATAG');
 
# print out some details about it
print "seq is ", $seq->length, " bases long\n";
print "revcom seq is ", $seq->revcom->seq, "\n";
 
# write it to a file in Fasta format 
my $out = Bio::SeqIO->new(-file => '>testseq.fsa', -format => 'Fasta');
$out->write_seq($seq);

For more information (for those familiar with Perl) see: Bio::Seq.

For Perl newbies

There are many web resources full of friendly patient folk for biologists new to Perl. While many developers on the BioPerl list are happy to chime in on Perl-specific questions, that list is mainly for questions that relate directly to BioPerl modules, or difficulties/ideas for applying those modules to specific tasks. Since BioPerl is written at a high level in sometimes terse code, the new perler jumping in is apt to stumble. No problem! Just have a look at some of the following:

The Beginner's FAQ

  • here you can find excellent links, plus directions for signing up to

The Perl Beginners Newsgroup

  • a newsgroup devoted to questions at all levels. Also, at

PerlMonks

one can get extremely sane, erudite, helpful, and patient responses. PerlMonks has perl resources for all user levels.

(When I google an error message, and see a perlmonks link, that's the one I click first...) --Ed.

When seeking help from PerlMonks (or other resources), you will get better/quicker responses if you read (and follow) Ask questions the smart way before posting.

Also, check out

The #bioperl IRC

("It's very quiet. Welcoming new lurkers of all skill levels. :)", says Jay. --Ed.)

Other Tips

One of the best ways to learn any language and make it stay learned is to work through a smarter/more experienced person's code. There are plenty of opportunities for that in the BioPerl distributions. Wondering about that error? Read the error message, which contains the line number in the module that threw it, then open that module and dig in!

Another great resource for seeing how the developers expect their modules to work are the regression tests, found in the ../t directories of the BioPerl distribution directory (find it in the GitHub repository.) These are just Perl programs; nothing scary about them. Check out the Test::More docs and the Perl Test cheatsheet for further guidance.

Another repos directory of interest is examples, where many many examples of BioPerl module use reside.

And don't forget the many introductory resources on

the BioPerl wiki

There are many short and simple code snippets in these places. You may even find your work has already been done for you!

A terrific resource for browsing BioPerl modules is

the Deobfuscator

by Dave M.

Other Useful Sites

--Happy Coding

Further reading

  • Read the other HOWTOs
  • Use the Wiki Search tools to find more information on specific topics.
Personal tools
Namespaces
Variants
Actions
Main Links
documentation
community
development
Toolbox