Jump to content

  • Log in with Facebook Log in with Twitter Log in with Windows Live Log In with Google      Sign In   
  • Create Account

Submit your paper to J Biol Methods today!
Photo
- - - - -

Which programming language for bio-sci?


  • Please log in to reply
15 replies to this topic

#1 K.B.

K.B.

    Veteran

  • Active Members
  • PipPipPipPipPipPipPipPipPipPip
  • 174 posts
3
Neutral

Posted 12 July 2010 - 03:58 AM

Hello,
Having a little bit more free time on my hands, at least for now, I'm thinking about starting to learn some programming language. My idea is to use it for writing small dedicated programs to help with my lab work and perhaps some DIY/home improvement/"gadget hacking"/"mad scientists" stuff. Which one would you advise me to learn?

#2 HomeBrew

HomeBrew

    Veteran

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 930 posts
15
Good

Posted 12 July 2010 - 04:05 AM

Perl.

#3 Adrian K

Adrian K

    Legendary Graduate Beggar

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 707 posts
28
Excellent

Posted 12 July 2010 - 08:28 AM

Hi HomeBrew,
I heard there is also Bio-Perl... which is better? I'm a total noob in programming....but i wish to learn.
<_<
Expecting the world to treat you fairly because you are a good person is like expecting the lion not to attack you because you are a vegetarian.

..."best of our knowledge, as far as we know this had never been reported before, though I can't possible read all the published journals on earth, but by perform thorough search in google, the keywords did not match any documents"...

"what doesn't kill you, makes you stronger"---Goddess Casandra reminds me to be strong

"It's all just DNA. Do it."---phage434

#4 HomeBrew

HomeBrew

    Veteran

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 930 posts
15
Good

Posted 12 July 2010 - 09:17 AM

BioPerl is a collection of Perl modules written to facilitate bioinformatics programming in Perl. The modules themselves are written in Perl. A Perl module is just a pre-written piece of code that one can call from within their main program to perform a function, thus saving the Perl programmer from having to re-invent the wheel.

For example, if in my Perl program I wanted to get information from a BLAST results file, I could write my own Perl code to parse this file and return all the various pieces of data for me, or I could just use the appropriate BioPerl module, e.g.:

#!/usr/bin/perl -w
use strict;
use Bio::SearchIO;  # This line loads the BioPerl module SearchIO

my $in = new Bio::SearchIO(-format => 'blast', -file => "your_favorite_file.blast");

while (my $result = $in->next_result) {
	while (my $hit = $result->next_hit) {
		while (my $hsp = $hit->next_hsp) {
			print "Hit name: " . $hit->name . "\n";
			print "HSP start (hit): " . $hsp->start('hit') . "\n";
			print "HSP end (hit): " . $hsp->end('hit') . "\n";
			print "HSP start (query): " . $hsp->start('query') . "\n";
			print "HSP end (query): " . $hsp->end('query') . "\n";
			print "HSP length: " . $hsp->hsp_length . "\n";
			print "number of identical residues: " . $hsp->num_identical . "\n";
			print "number of conserved residues: " . $hsp->num_conserved . "\n";
			print "strand: " . hit->strand . "\n";
			print "sequence of hit: " . $hsp->hit_string . "\n";
		}
	}
}


#5 Thensome

Thensome

    member

  • Active Members
  • Pip
  • 5 posts
0
Neutral

Posted 12 July 2010 - 09:28 AM

I worked as a developer before going into bio. Although I love perl, I cannot recommend it. Go with python. Much clearer syntax, and so many systems comes with python api these days.

#6 HomeBrew

HomeBrew

    Veteran

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 930 posts
15
Good

Posted 12 July 2010 - 09:35 AM

That may be (clearer syntax, etc.) but take a look at the bioinformatic journals -- if code is released, it's usually in Perl... So, while Python may be a technically superior language in your opinion, Perl is much more widely used in bioinformatics, thus learning it is more beneficial.

But, in any event, it's got to be Perl, Python, or Ruby, if you're looking for a scripting language...

#7 Adrian K

Adrian K

    Legendary Graduate Beggar

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 707 posts
28
Excellent

Posted 12 July 2010 - 03:51 PM

That may be (clearer syntax, etc.) but take a look at the bioinformatic journals -- if code is released, it's usually in Perl... So, while Python may be a technically superior language in your opinion, Perl is much more widely used in bioinformatics, thus learning it is more beneficial.

But, in any event, it's got to be Perl, Python, or Ruby, if you're looking for a scripting language...


o_O
==''

Perl, Ruby, Phyton, Bioperl... is endless... I wish I learn at least one of this...

Any idea or good books (Perl for dummies???) I can begin with?
LOL
Expecting the world to treat you fairly because you are a good person is like expecting the lion not to attack you because you are a vegetarian.

..."best of our knowledge, as far as we know this had never been reported before, though I can't possible read all the published journals on earth, but by perform thorough search in google, the keywords did not match any documents"...

"what doesn't kill you, makes you stronger"---Goddess Casandra reminds me to be strong

"It's all just DNA. Do it."---phage434

#8 HomeBrew

HomeBrew

    Veteran

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 930 posts
15
Good

Posted 12 July 2010 - 04:23 PM

Any idea or good books (Perl for dummies???) I can begin with?



Well, the classic starting book for Perl is Programming Perl, aka "the Camel book", now in its 3rd edition. This is a comprehensive book, covering all aspects of Perl. One of the authors, Larry Wall, is the creator of Perl.

For a quick-start on bioinformatics in particular, Beginning Perl for Bioinformatics is pretty good too, but a bit dated.

#9 Adrian K

Adrian K

    Legendary Graduate Beggar

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 707 posts
28
Excellent

Posted 12 July 2010 - 04:35 PM

Thanks ya.
Expecting the world to treat you fairly because you are a good person is like expecting the lion not to attack you because you are a vegetarian.

..."best of our knowledge, as far as we know this had never been reported before, though I can't possible read all the published journals on earth, but by perform thorough search in google, the keywords did not match any documents"...

"what doesn't kill you, makes you stronger"---Goddess Casandra reminds me to be strong

"It's all just DNA. Do it."---phage434

#10 pcrman

pcrman

    Epigenetist

  • Global Moderators
  • PipPipPipPipPipPipPipPipPipPip
  • 1,160 posts
65
Excellent

Posted 12 July 2010 - 06:24 PM

I agree with HomeBrew that perl is the right one to start with. Of course if you want to create some web based applications, php is another laugauge you must learn. The good news is that once you know perl or any programming language, learn other languages is a piece of cake.

#11 DELETEMYACCOUNTPLEASE

DELETEMYACCOUNTPLEASE

    Y U NOT DELETE MY ACCOUNT?

  • Active Members
  • PipPipPipPipPip
  • 58 posts
1
Neutral

Posted 26 July 2010 - 02:10 AM

use python ! perl

Then, if you want to do web stuff, play with Django - nicer than perl catalyst IMO.

perl is great but lack of easy use of objects is annoying (including moose)

I used perl - currently use python + django - scala/java and a little bit of clojure.

I would also suggets that you use Learning Perl - avoid the "* for bioinformatics" books because they don't teach you how to program.

#12 chromatin

chromatin

    Enthusiast

  • Active Members
  • PipPipPipPipPip
  • 31 posts
0
Neutral

Posted 01 October 2010 - 04:33 PM

I have been programing in Perl for about a year. My first programming language. I like it. However, I my computer friends recommend Python. It has cleaner syntax, should be easier to learn. However, it is not a big deal. Once you know one language, learning a second one is much easier if necessary. Perl is more common in bioinformatics and has a lot of available modules (programs that other wrote and publicly available). Enjoy it. It's very much fun.
http://www.bioprotocols.info

#13 semin

semin

    member

  • Active Members
  • Pip
  • 7 posts
-1
Neutral

Posted 27 December 2010 - 01:27 AM

If you are to learn Python, have a look at Bioinformatics Programming Using Python by Mitchell L. Model (from Oreilly).

#14 davidiphone5

davidiphone5

    member

  • Active Members
  • Pip
  • 5 posts
0
Neutral

Posted 19 October 2011 - 02:01 PM

I've used LISP to develop IA algorithms several years ago. Is it still in use?

#15 DELETEMYACCOUNTPLEASE

DELETEMYACCOUNTPLEASE

    Y U NOT DELETE MY ACCOUNT?

  • Active Members
  • PipPipPipPipPip
  • 58 posts
1
Neutral

Posted 20 October 2011 - 11:38 AM

Clojure is a lisp, it seems to be gaining popularity while dropping some (of(the parens)).




Home - About - Terms of Service - Privacy - Contact Us

©1999-2013 Protocol Online, All rights reserved.