# Practice Programming at Rosalind.info

• (2 Pages)
• 1
• 2

## 27 Replies - 10691 Views - Last Post: 21 June 2013 - 03:46 PM

### #1 cfoley

• Cabbage

Reputation: 2170
• Posts: 4,553
• Joined: 11-December 07

# Practice Programming at Rosalind.info

Posted 31 March 2013 - 10:02 AM

POPULAR

Rosalind.info is a great website for practice programming problems. I thought some of you might be interested in checking it out, either to hone your skills or to recommend to others. It's a bit like Project Euler in that it has a bunch of programming problems of increasing difficulty. However, where Euler is maths-based, Rosalind's problems are based in bioinformatics.

What's bioniformatics? It's all to do with processing biological data: gene sequences, protein structures, etc. The subject is at the boundary between biology, chemistry, maths and computer science. On the computing side, there is a heavy emphasis on algorithms. In fact, the problems are divided into groups based on the kind of algorithm:

* Alignment
* Combinatorics
* Computational Mass Spectrometry
* Dynamic Programming
* Genome Assembly
* Genome Rearrangements
* Graph Algorithms
* Phylogeny
* Probability
* Set Theory
* String Algorithms

As you can see, there is a big overlap with a typical algorithms book. However, don't be put off if you are a beginner. The problems start off really simple. There is even an introductory section designed for people who have never programmed before. For the more advanced programmers, the problems eventually get very tough.

Each problem has an introduction that gives a little bit of biological background and links it to the computational problem. It then gives a precise description of the programming challenge and some test input data with the expected result. When you think you are finished, you can download a file containing a large set of input data. You post the result that your program gives and if it is correct you can move onto the next problem. If not, you have the chance to fix it. Each time you download some input data, it is different which helps to keep you honest.

I'm using it as a problem set for learning Racket so a mixture of easy and difficult problems is exactly what I need. Whatever you think of bioinformatics as a subject, using a domain like this as a vehicle for learning to program is an excellent idea. It teaches what can sometimes be abstract or dry concepts but frames them with a real use. I certainly find a subject more interesting when I have a real use for it, and I think many others are the same.
I also love the idea that the site teaches programming and another domain at the same time. I think it’s an excellent idea and I hope that more sites like it crop up in the near future.

Is This A Good Question/Topic? 7

## Replies To: Practice Programming at Rosalind.info

### #2 Michael26

Reputation: 378
• Posts: 1,566
• Joined: 08-April 09

## Re: Practice Programming at Rosalind.info

Posted 01 April 2013 - 09:27 AM

This is excellent, but i had to submit 3 or 4 time before i got correct answer(even though the answer was correct)

### #3 cfoley

• Cabbage

Reputation: 2170
• Posts: 4,553
• Joined: 11-December 07

## Re: Practice Programming at Rosalind.info

Posted 01 April 2013 - 09:33 AM

That's strange. It hasn't happened to me yet. How do you know your answer was correct? Does it tell you the correct solution if it thinks you are wrong?

### #4 Michael26

Reputation: 378
• Posts: 1,566
• Joined: 08-April 09

## Re: Practice Programming at Rosalind.info

Posted 01 April 2013 - 09:57 AM

I know it's correct because i try the supplied sample dataset first to see if i did right, and then when i get the same result i download dataset to solve.

for example in first problem "A Rapid Introduction to Molecular Biology" i got the correct answer but the order was incorrect and it didn't accept the answer. It's supposed to be A,C,G,T but i did C,G,T,A

This post has been edited by Michael26: 01 April 2013 - 10:09 AM

### #5 baavgai

• Dreaming Coder

Reputation: 6192
• Posts: 13,305
• Joined: 16-October 07

## Re: Practice Programming at Rosalind.info

Posted 01 April 2013 - 10:08 AM

Heh, thanks for the reminder. I apparently solved half a dozen of these five months ago. Been meaning to get back to it.

I'd also thought to get back onto the Lispy horse with some kind of puzzle selection like this. It's, just, well, so satisfying in Python.

### #6 atraub

• Pythoneer

Reputation: 820
• Posts: 2,197
• Joined: 23-December 08

## Re: Practice Programming at Rosalind.info

Posted 01 April 2013 - 04:01 PM

Love this. This'll be a great way to keep my programming brain in shape

### #7 Lemur

• Pragmatism over Dogma

Reputation: 1424
• Posts: 3,596
• Joined: 28-November 09

## Re: Practice Programming at Rosalind.info

Posted 02 April 2013 - 11:15 AM

4 down. This is quite amusing indeed. Good find.

### #8 cfoley

• Cabbage

Reputation: 2170
• Posts: 4,553
• Joined: 11-December 07

## Re: Practice Programming at Rosalind.info

Posted 02 April 2013 - 11:32 AM

I have to admit I didn't find it. It was recommended to me by a friend who knows I do bioinformatics. He had started working through the problems using Bash.

### #9 Lemur

• Pragmatism over Dogma

Reputation: 1424
• Posts: 3,596
• Joined: 28-November 09

## Re: Practice Programming at Rosalind.info

Posted 02 April 2013 - 03:05 PM

Yeah, if someone can't do #2 without using C or another language... SED works wonders, I was actually surprised that was even considered a problem.

### #10 xclite

• I wrote you an code

Reputation: 971
• Posts: 3,399
• Joined: 12-May 09

## Re: Practice Programming at Rosalind.info

Posted 02 April 2013 - 08:40 PM

sed is one of those tools that really shines when you have something that fits its domain. I've started giving this a go in clojure. Got a git repo and everything:
https://github.com/bran-flake/rosalind

Most of the rest of my github is a code graveyard so I should probably commit stuff to it and keep "active."

Edit: Just looked at that problem and yeah... pretty easy haha.

This post has been edited by xclite: 02 April 2013 - 08:45 PM

### #11 Lemur

• Pragmatism over Dogma

Reputation: 1424
• Posts: 3,596
• Joined: 28-November 09

## Re: Practice Programming at Rosalind.info

Posted 02 April 2013 - 08:58 PM

Most of mine is posted on http://www.baweaver.com/rosalind though a few of the solutions are pretty contrived to be honest. I need to freshen up a bit, too much scripting and hacking instead of development. Most of the first round will be Ruby or Bash, and I'll rewrite for other languages later.

This post has been edited by Lemur: 02 April 2013 - 09:00 PM

### #12 jon.kiparsky

• Pancakes!

Reputation: 8563
• Posts: 14,802
• Joined: 19-March 11

## Re: Practice Programming at Rosalind.info

Posted 03 April 2013 - 11:19 PM

Fun stuff. Did about half a dozen this evening. Still in the "knocking them off" phase, but I hope it'll get a little trickier pretty soon.

### #13 cfoley

• Cabbage

Reputation: 2170
• Posts: 4,553
• Joined: 11-December 07

## Re: Practice Programming at Rosalind.info

Posted 04 April 2013 - 12:26 AM

You can always look ahead. It won't let you submit answers until you've done the prerequisites but you can see the problems.

### #14 jon.kiparsky

• Pancakes!

Reputation: 8563
• Posts: 14,802
• Joined: 19-March 11

## Re: Practice Programming at Rosalind.info

Posted 04 April 2013 - 07:46 AM

I'm not impatient... it's kind of fun to knock down the easy ones, makes me feel smarter than is probably warranted.

### #15 eugenerudenko

Reputation: 2
• Posts: 47
• Joined: 13-March 13

## Re: Practice Programming at Rosalind.info

Posted 04 April 2013 - 07:50 AM

Nice service, especially for me. Will have a lot of fun in the coming weeks))