Forum: Programming Language In Bioinformatics
0
gravatar for AndreiR
4.6 years ago by
AndreiR240
São Paulo
AndreiR240 wrote:

I understand that each programming language has its advantages and disadvantages. Had some experience on python and perl. I start reading about ruby, bioruby and different questions come to my mind. Away from personal prefereces, regarding syntax for example, what should guide the choice for python, perl, ruby or other languages? There are true advantages of one language instead of other?

perl python forum • 4.1k views
ADD COMMENTlink modified 4.6 years ago by Woa2.6k • written 4.6 years ago by AndreiR240
1

I think you can find a lot of comparisons on Internet. If you don't know any of the language and want to learn one especially for bioinformatics then either of perl or python are great. This way you should be able to use BioPython and BioPerl. I have never used Ruby and don't know anything about BioRuby. It could be great too but I have never used it. I have coded both in Perl and Python and personally I believe Python would be quick to learn.

ADD REPLYlink modified 4.6 years ago • written 4.6 years ago by Ashutosh Pandey11k
2

This type of question is already covered copiously On The Internet, and is entirely about personal preference. The answer should be "the best programming languages are the a) the one you know today plus b) the three or four you will learn in the next several years as your projects and skills expand." I started with R, since at the time I needed stats and making figures and then microarray analysis. I looked at Python, have used it for some projects but overall prefer Perl due to its syntax, CPAN, web frameworks, and also user community -- but that is really entirely personal and subjective. What are your mentors using? What are your friends using? What are they not using? Try to learn something from all of them.

ADD REPLYlink modified 4.6 years ago • written 4.6 years ago by Alex Paciorkowski3.3k

Thank you for the answer Alex. Indeed, this question is exhaustively discussed. My point was about performance, memory management, "small" and "fast" coding. Maybe something about cost and benefit. In the end, as you put it, personal and subjective impressions may lead the choice. :)

ADD REPLYlink written 4.6 years ago by AndreiR240

I am absolutely zero in python, I want to learn then I installed Pycharm, now you think I better start with a book like " Learning to Program Using Python by Cody Jackson" or suggested weblogs in biostars-googling????

Thank you

ADD REPLYlink written 4 months ago by Fereshteh2.8k
1

PyCharm is a great development environment, but yes it won't teach you Python. There are probably dozens, if not hundreds, of online courses you can do for free to learn Python. Depending on what you want to do you'll even find some geared towards Data Science type analyses versus standard things. Coursera, EdX, CodeAcademy, etc. Definitely where you want to go versus a book.

ADD REPLYlink written 3 months ago by Dan Gaston6.9k
7
gravatar for Pierre Lindenbaum
4.6 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum102k wrote:

see

Which are the best programming languages for a bioinformatician?

Best language for introductory programming course from within an introduction course on Bioinformatics.

ADD COMMENTlink written 4.6 years ago by Pierre Lindenbaum102k
5
gravatar for Gabriel R.
4.6 years ago by
Gabriel R.2.2k
Center for Geogenetik Københavns Universitet
Gabriel R.2.2k wrote:

A picture is worth a 1000 words :https://ibb.co/ciyRnQ

ADD COMMENTlink modified 3 months ago • written 4.6 years ago by Gabriel R.2.2k
3
gravatar for Dan Gaston
4.6 years ago by
Dan Gaston6.9k
Canada
Dan Gaston6.9k wrote:

While it has been covered several times, and ultimately comes down mostly to personal preferences, I think these are worth having from time to time as people update (and languages too). I've become a python convert. I learned programming initially in C and later added Java and Perl. When I started grad school I was coding pretty much exclusively in Perl with one project that I inherited in Python as there was existing legacy code. I stuck mostly with Perl throughout my PhD but started using Python more often. After starting my post-doc I decided to try doing much of my work in Python instead of Perl and absolutely fell in love with it for genomics.

Perl is still superior for arbitrary text parsing. I find it much less cumbersome when it comes to regular expressions for instance. But Python has so many great libraries for handling delimited-file types, defaultdict is powerful, and it has lots of great genomics libraries that are truly object oriented compared to Perl.

Basically between PyVCF, PyBedTools, the csv package, defaultdict, and IntervalTree I can do some really powerful analyses with Python in a really efficient manner compared to Perl.

ADD COMMENTlink written 4.6 years ago by Dan Gaston6.9k
1
gravatar for AndreiR
4.6 years ago by
AndreiR240
São Paulo
AndreiR240 wrote:

One comparison of perl python and ruby

http://jimhester.calepin.co/perl-vs-python-vs-ruby-restriction-enzyme-regular-expression-performance.html

And a paper "A comparison of common programming languages used in bioinformatics" Mathieu Fourment* and Michael R Gillings

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2267699/pdf/1471-2105-9-82.pdf

And a comparison regarding "mainly: loops, dynamic arrays with numbers, basic math operations."

http://blog.famzah.net/2010/07/01/cpp-vs-python-vs-perl-vs-php-performance-benchmark/

ADD COMMENTlink modified 4.6 years ago • written 4.6 years ago by AndreiR240
2

I don't have much experience in programming (I am just starting with bash), so no bias from me. And in http://jimhester.calepin.co blog post ruby seems to be the cleanest and most human readable language compared to python or perl, is it?

ADD REPLYlink written 4.6 years ago by Paul20
1

I'm not sure I would consider parsing of RE cutsites a common task these days in Bioinformatics. But Regular expressions are, IMHO, a weakness of python. If I need to do a lot of parsing of that sort I will tend to go towards perl. Not having to compile regular expressions makes it much more clean (and fast). That said a lot of routine regular expression type stuff can be handled very quickly in Python. startswith() and endswith(), contains(), etc are all pretty powerful.

With genomics work I am finding I deal mostly with delimited file types anyway, which makes things a lot easier. If there is a header it also makes it much more intuitive to parse large files line by line in an object-oriented fashion with things like the csv and DictReader/DictWriter modules.

ADD REPLYlink written 4.6 years ago by Dan Gaston6.9k
1
gravatar for Samuel Lampa
4.6 years ago by
Samuel Lampa1.1k
Stockholm
Samuel Lampa1.1k wrote:

This comparison, on doing a typical bioinformatics task (calculating GC content) in a bunch of different languages, might give you some pointers: http://saml.rilspace.org/moar-languagez-gc-content-in-python-d-fpc-c-and-c

If you click the language names in the list under the graphs, you can see code examples, to get an idea of code readability.

As you can see, python, by using PyPy, does a very good job and is comparable to compiled languages. If you want slightly better performance still, while wanting to keep code compact and readable, D would be my next bet. (Compare code: Python, and D).

ADD COMMENTlink written 4.6 years ago by Samuel Lampa1.1k
0
gravatar for AndreiR
4.6 years ago by
AndreiR240
São Paulo
AndreiR240 wrote:

Found an interesting post

http://stackoverflow.com/questions/1113611/what-does-ruby-have-that-python-doesnt-and-vice-versa

ADD COMMENTlink written 4.6 years ago by AndreiR240
0
gravatar for Pappu
4.6 years ago by
Pappu1.8k
Pappu1.8k wrote:

Python is #1 in the market now!

ADD COMMENTlink written 4.6 years ago by Pappu1.8k
0
gravatar for Woa
4.6 years ago by
Woa2.6k
United States
Woa2.6k wrote:

How about this? Do you people think it'll mark its presence soon in the field of Bioinformatics? http://julialang.org/

ADD COMMENTlink written 4.6 years ago by Woa2.6k
2

Doubtful. It looks interesting but you need a certain level of language maturity to start to get broad adoption within any field of science. The existence of libraries for common (and difficult) tasks is what currently makes or breaks a language I think. If a new language offers substantial improvement, particularly in data processing speed or how well it matches how we want to conceptualized a particular task, it may be worth the effort of a small community building up those libraries.

ADD REPLYlink written 4.6 years ago by Dan Gaston6.9k

I don't have any idea but is this the same reason for the language "D" didn't become that popular? http://en.wikipedia.org/wiki/D_%28programming_language%29

ADD REPLYlink written 4.6 years ago by Woa2.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1509 users visited in the last hour