When Python becomes more than a snake type

Nowadays the use of computational methods and the production of biological big data is more and more common in the everyday activities of any research lab, and it is very important that new generation of scientists in biological research are comfortable using these technologies and analysing their data. This is one of the reasons why the Molecular Techniques in Life Science Joint Master Programme (MTLS) includes several courses in Python Programming.

The programming courses are known as the Applied Programming for Life Sciences  (or APLS, as we call them) 1, 2 and 3. Each one takes place in one of the first three semesters of the program, and go from the very basics of Python to collaborative and reproducible coding.

coding.jpg

Students of the MTLS Programme learn how to code in Python to analyse biological data and write our own programs. Photo credits: Pixnio

APLS 1 – Discovering Python

The first Python course takes place in the first semester of the master’s, organized by Karolinska Institutet. It is a great introduction to Python, since it assumes that students have never programmed before. We cover both theoretically and practically the main concepts in programming, such as:

  • Object types
  • Flow control structures: conditionals, while loops, for loops
  • Introduction to functions and modules
  • Introduction to scientific libraries

For every theoretical session there is a practical one in which we practice all these concepts by solving small exercises. I personally enjoyed the collaborative environment in class, because although these assignments had to be submitted individually we were welcome to discuss with our peers how to approach them, or to compare the different strategies we used.

APLS2 – Writing “Pythonic” code

This was the most surprising APLS course for me, but also the one in which I learned the most. The surprising part was that the professor, Lars Arvestad, only used the blackboard to teach the course. Of course, this seemed weird at the beginning, because how are you going to program without a computer? Turns out, it was a super-efficient way for communicating his point and for us to understand Python’s logic.

The APLS2 course was focused on improving our coding style, given that we already knew the basic pieces of any program. We covered contents such as:

  • Modularization and writing “pythonic” functions
  • Creating classes and object-oriented programming
  • Writing command line tools

All of the lectures were accompanied by a take-home assignment that consisted on modifying a programme to include all the improvements and concepts we had learned in class. It was a nice way to encourage our creativity, since different people used different approaches to solve the assignment, and there was no limit to how much we could improve the code. Also, the fact that the course was graded as pass-or-fail relieved most of the stress linked to the assignment submission deadlines, and we could just focus on enjoying and learning programming 😀

APLS3 – Becoming A+ Programmers

The last one of the APLS3 courses focused on how bioinformaticians, software developers and programmers work nowadays. It focused on three aspects:

  • Version control and collaborative coding.
  • Testing our own codes.
  • Scientific Libraries

I liked this last course because it was very connected to the real, practical knowledge any bioinformatician should have, and I felt that the exercises we did in class were very useful for my future work.

 

After having taken all the APLS courses I feel like we have become comfortable programming in Python, and many of us will be using it in our master’s thesis. Of course, what you take out of these courses depend on your previous programming experience as well as how much programming you practice out of the classroom, but there is a good flow of concepts that starts from the very very basics of Python, so don’t let the programming scare you from applying to the MTLS Master’s 🙂

As a reminder, don’t forget to apply to KI Global Programmes before the 15th of January 202

Cover picture credits: Pixnio

\Inés


email: ines.rivero.garcia@stud.ki.se

LinkedIn: Inés Rivero García

2 comments

ravi bose

ravi bose

thank for sharing python tip

Related posts