Beginner Bioinformatics in Python — Part 10

3 min readNov 14, 2022

This is a series of blog posts about my experience undergoing the beginner level bioinformatics course on Coursera. This is the final part of the series, and talks about the overall experience and lessons learnt.

If you’ve not read the previous parts, I would recommend starting there.

Link to Part 1
Link to Part 2
Link to Part 3
Link to Part 4
Link to Part 5
Link to Part 6
Link to Part 7
Link to Part 8
Link to Part 9

While previous blog posts talked about specific biological problems solved, this post only does a recap of what I learnt. But before I go into what I learnt, let’s do a recap of the programming style —

Programming Style

After I’d done some of the chapters, I decided on the following rules —

  1. Immutability: There were no mutable variables in any of the functions that I wrote.
  2. Functional Style: Immutable code naturally lead to a functional style of code. I made sure I was not writing any loops, and instead was either dealing with data transformations or recursion.
  3. Minimalistic Code: I did not follow this rule completely, but when I came with an interesting way to solve a problem but it affected readability, I still went with it. I wanted to learn different paradigms, irrespective of whether the code was 100% readable or not.
  4. Tests: Writing tests was different in the case of

Computation in Biology

Before taking this course, I had a simplistic idea of the kind of computational problems that could exist in Biology, esp in Genetics. For example, with the rise of Gene Editing using CRISPR Cas-9, and the genome mapping, we could apply computation and data science to understand which genes affect which traits, which medicines and foods would be best for them, and if gene editing gets legalized, then what kind of genes to edit.

After taking this course, I realise that the scope of applying computation in genetics is thousands of times more than I had thought. We spent an entire course only on coming up for techniques for finding the Replication Origin and Regulatory Motifs. Imagine how many more complex interactions of genes are there, and what kind of problems need to be solved.

Learnings About Programming

There were some surprising learnings about coding practices and as I learnt the course.

  1. The Simplest Anti-Pattern: Out of all the coding anti-patterns that we discuss, the most critical ones are, unsurprisingly, the simplest ones. The anti-patterns that affected the code the worst were long functions, bad naming, and side effects in functions. Keeping good variable and function names, reducing function size, and making sure there were zero side effects were the most critical aspects of writing good quality code. It made the code more declarative in nature, easier to understand and extend.
  2. The Power of Functional Programming: It takes some time to get used to writing programs in a functional manner. It seems that simple pieces of code that could be written in a few minutes using for loops take a lot more time to write. But the resultant code is powerful. In a couple of lines, we’re able to achieve what took many lines with loops.
  3. The Importance of Abstraction: While all programs used in this course were really tiny, they showed that even here abstraction is very important. In the course, I abstracted logic using functional programming, but we could have organised the code using object oriented programming too. Either ways, as long as the language has the power to abstract and encapsulate certain pieces of logic, we are able to achieve code that is modular and flexible.

These were just some of the learnings from the experience. In future, I wish to take even more courses on Bioinformatics. Let’s see what they teach me.