Perl has come to cover many areas of IT and has been dubbed the 'glue' for that matter. Perl has also contributed to Biology, big time, it saved the human genome project and not only that, it has continued to be the mainstay of much bioinformatics munging and analysis, playing no small part in the burgeoning ‘*omics’ sciences.

The increasing number of bioinformatics related Perl problems that seem to be coming up in the Monastery, and the confusing and disparate resources available on the internet contribute a great deal to making BioPerl fearful or at least "perl-plexing"…

PerlMonks plays a great role in the evolution of Perl, it has encouraged many to join up the community and exchange knowledge in a place of utmost cohesion between its members and thus BioPerl coders can be equally encouraged to participate and share their knowledge and code.

The BioPerl suite of modules revolves around sequence acquisition, parsing and retrieval from public databases and automating various tasks related to studying these sequences BioPerl HOWTOs. Think this is simple? Think again - CODE.GOOGLE.COM tells us there are 3,666,478 lines of code to get your head round!

A sequence is just a text string in a certain format (this format is described in the beginning of the text file containing that sequence) that represents either a gene or a protein, the alphabet of the sequence with regard to genes is but a combination of four letters (ACGT) and sometimes U (replaces T) and N (for aNything). A gene represents a sequence too, so doesn't negate the fact that it still has the aforementioned alphabet. ('GATTACA' is a sci-fi movie name that has these four letters). The Protein alphabet, on the other hand, comprise 20 letters.

Working with either type of sequences (DNA or protein) can involve:

sequence comparison (Sequence Alignment): two or more sequences are compared against each other to evaluate how similar they are, and where they are similar.

So, while this isn't intended to do the job of the extensive BioPerl docs, or many reference points out there, it will hopefully be a starting platform for those looking to delve deeper into using Perl in bioinformatics related tasks and also assisting Monks in becoming more accessible to BioPerl questions: Facilitating the back and forth that makes Perl and the Monastery so special.

It is also to highlight the interesting problems that bioinformaticians have to deal with - not all are BioPerl related(!) and can often involve huge, diverse datasets. And we hope that these sorts of challenges will tempt a few talented programmers to get involved.

Tips on posting bioinformatics type questions in the Monastery:

REMEMBER:a well formulated question will garner better and quicker response. so
please go through the following whenever you notice that your question or parts thereof don't look like how you expected after you have hit the "preview" button.

Since not all monks are familiar with biology terms and not all monks are into bioinformatics, so as much as possible, use clear language that describes what your problem is and use biology terms only when relevant, better still, post the part of your Perl code that describes the problem or demonstrate the problem in Perl.

BAD QUESTIONS:

"I have a DNA sequence that I want to BLAST and I tried Bio::Tools::Run::StandAloneBlast but it did not work how can I do that? "

OR:

“I am trying to translate my coding sequence, I can work out the tRNA lookup table, but I can’t break up the sequence into codons - any ideas?”

These sorts of questions invite down-voting and confuse monks and their response would be either trying to extract words from you to get you to explain it better, make wild guesses that would confuse you the more or ignore your question rather than BLASTing on you. Better to think about what you are trying to actually do and think about how this is a Perl problem.

This leads to an important point - often overlooked - of providing test data (just enough - 3 cases of input, not the whole file, and if it is in a particular format - say which or provide an example of its layout !), and if you are really stuck, what output you want. This greatly helps people grasp what you are doing and also test any code they produce.

A GOOD QUESTION:

I am trying to convert a string (a DNA sequence) into a series of three-letter sub-strings– to do that I have written the following code but I failed to make the substrings overlap by moving one letter at a time from the original sequence in the forward direction.

Now that seemed like an ideal question, clear wordings, examples of input and desired output and the code involved if any so that testing the respondents code on the provided data is made possible.

Finally, always check to see if your problem hasn’t been answered before - learn to love Super Search and google… There are also links to discussions in the Monastery that may be of interest!

Good coding practice:

Many bioinformaticians are new to coding and can be guilty of certain malpractices, so your code should be readable, self-descriptive and properly indented and commented. Good coding practices are critical point checks, they can alert you to avoid potential errors, dangerous coding behavior and enable you reduce debugging time and increase code efficiency and re-usability. And as always, usewarnings and strict, check for errors etc… because you never know what this code could be used for! Maybe some IO error means that a potential cancer biomarker is missed (extreme example, but point remains!).

Also - remember that posted nodes can be edited at a later point -if you are signed in as yourself and not under Anonymous Monk- to encompass suggestions, changes to code, what course was finally decided etc... Remember that it is considered good practice to mark any changes with ‘Update:’.

Tips on Answering BioPerl Questions:

This is still under development and requires contributions from our generous Monks

Typical problems and solutions:

INSTALLATION:

A frequent problem is the installation of BioPerl, this in itself is not difficult if certain caveats are attended to. If you are familiar with Installing Modules then you are good to go.

Furthermore, it seems that as of January, 2010 the folks at Strawberry Perl are planning a Strawberry Perl Professional Distribution that comes with BioPerl bundled within the default installation which would eliminate the requirement for its manual installation.

Good Ol' CPAN:

Using CPAN to install BioPerl could be the easiest way for some experienced BioPerl programmers.

Often IO problems start with the sequence having non-canonical letters, punctuation, or whitespace left in from reading in the sequence, so perlretut and perlop for help on regexes, and substitutions (s///) which are one way of checking for / replacing naughty characters.

Bio::DB and Bio::DB::Query to either retrieve a single sequence from a database via its ID or ACCESSION Number or retrieve multiple sequences at a time by query objects containing search terms and criteria specific to the database under investigation.

So now you have a good start on the Perl side, but want some data to play with? Much of bioinformatics revolves around the integration of large datasets in an attempt to draw out relationships, ultimately giving biological meaning to observed phenomena.

Fortunately, biology naturally lends itself to informatics, with known hierarchies and inter-relations mirroring OO structuring, and the sheer abundance of data makes the challenge interesting. Here are a few possible sources of publicly available data:

Gene Ontology is a "structured, controlled vocabulary" accessed as "a relational database comprising the GO ontologies and the annotations of genes and gene products to terms in the GO." This sort of annotation is becoming a very popular way of approaching problems like "what commonalities link my group of highly expressed genes?". Code is already appearing on cpan for accessing and querying GO data.

Again from the NCBI, this is a repository of actual genome-wide experimental data, fully annotated. Programmatic access is still fairly rudimentary, but once you have the data, the sky is the limit. Publication is dependent on making your data publicly available, so new datasets are continuously appearing.

"BioLion: this was my first major experience of bioinformatics, beyond university/college short courses, and was superb. The focus is very problem-oriented, and has a heavy emphasis on teaching you to teach yourself, which in the long run is the most important lesson."

Lastly, if you are really interested, there are several good forums / sites that advertise jobs within bioinformatics and related science. Personally, I have found job-hunting to be no easy task, so here is a few of the better things I have stumbled upon: