Summary: | Ruby and Perl are programming languages used in many fields. In this paper we would like to present their usefulness with regard to basic bioinformatic problems. We concentrate on a comparison of widely used Perl and relatively rarely used Ruby to show that Ruby can be a very efficient tool in bioinformatics. Both Perl and Ruby have a built-in regular expressions (or regexp) engine, which is essential in solving many problems in bioinformatics. We present some selected examples: printing the file content, removing comments from a FASTA file, using hashes, printing nucleotides included in a sequence, searching for a specific nucleotide in sequence and translating nucleotide sequences into protein sequences obtained in GenBank format. It is our belief that Ruby’s popularity will rise because of its simple syntax and the richness of its methods. Programs in Ruby are very easy to read and therefore easier to maintain and debug, which are the most important characteristics for a programming language.
|