Applied Python Programming for Biomedical Sciences
Course content
Many different areas of biosciences struggle with two large challenges. Firstly the amount of data that can be generated by just one experiment in very short time can be huge and a meaningful filtering can only be carried out by computational means. Secondly, processing of data can often at best be made with existing webservers, but even in that case output data from one webserver often needs to be converted and filtered to be suitable for input to another and given the quantities of data this is often not feasible to do by hand. Knowing basic programming is therefore an essential skill for a person working in the biosciences.
The aim of the course is to make the students able to analyze and process large biological data sets by writing and running Python programs. The course gives an introduction to data processing and filtering using the programming language Python. Thus the main part of the course is to introduce the programming language Python itself. The course is aimed at students with no prior programming experience.
The course will cover how to learn new concepts in the Python language. The outset is specific cases from biosciences, and the student learns by analyzing and redesigning existing pre-designed code that process data for the specific cases.
With outset in the cases the pre-designed code will be analyzed and concepts introduced as the different code pieces are introduced through their specific applications. The cases will complement each other concepts and the technical level will be increased from case to case. Through the cases it will also be demonstrated how to design a modular chain of programs of which some can be used in multiple contexts. Some Python programs can for example be general by converting one data format to another and can therefore be reused in multiple contexts. Overall the most common and useful features of the language will be introduced. Including:
* Printing to the screen
* Single value variables
* Multi-value variables like list, tuples and dictionaries
* If, elif, else control structure
* Loops
* Functions
* Introduction to classes
* Introduction to packages like Numpy and Matplotlib
* Working with files
* Writing results to a file
Jupyter notebooks will be introduced.
The course will also introduce how to write well structured
code. This will include splitting code into smaller functions and
the usage of packages.
MSc Programme in Biotechnology- restricted elective
MSc Programme in Molecular Biomedicine- restricted
elective
To perfectly comply with the course requirements the students should be able to acquire the following:
Knowledge:
Read and understand Python scripts for analyzing biological data.
Search for information about parts of the Python language the
student is not familiar with.
Skills:
Design the flow of how data can be processed and identify which
Python programs are needed. Write Python scripts and solve problems
by modifying existing Python code which solves similar problems.
Solve small novel problems. Write code that is free from
errors.
Competences:
Work with basic Python syntax. Design of a flow where consecutive
Python program are needed to process the data and where a
Python program can be used multiple contexts.
The course is based on cases on data processing from
biosciences. Except for a few introductions and results sessions
the students will be working cases directly on the computers.
Follow up on the cases will be given in the class room or as videos
when needed. In the first half of the course, the students will be
provided with cases containing pre-designed Python programs for
analysing the respective cases. The student will have to modify the
code in these. In later cases the student will be expected to write
more of the programs themselves.
In the last half of the course the students will work on a project
where they will be able to use their own data (or on data
provided). In this part they will have to write their own Python
programs and possibly integrate them with existing modules and
programs. In addition to learning how to make small Python programs
the students will also build up a library of tools to solve
specific problems with in their studies. The students will be able
to use the Windows, Apple, or Linux systems as they see
fit.
* Handouts
* Videos from Absalon and YouTube
* How to Think Like a Computer Scientist: Learning with Python 3 Documentation. Release 3rd edition. Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers http://www.ict.ru.ac.za/Resources/cspw/thinkcspy3/thinkcspy3.pdf
Open for credit transfer students and other external students. Apply here:
Credit transfer students apply here
Other external students apply here
- ECTS
- 7,5 ECTS
- Type of assessment
-
Written assignment
- Type of assessment details
- The exam is an individual project where the student in
collaboration with the supervisor chooses a subject and the data to
analyze. The end result consists of three parts:
1: The code developed during the project in the form of a Jupyter notebook, one or more scripts or libraries.
2: A report describing the projects (pdf format).
3: Any input files necessary to run the code, which have not been provided by the supervisor.
The code can be written either as one or more terminal scripts, or as a Jupyter notebook.
If the project is written as a terminal script the code must be in one or more `.py` files, and it you must use `argparse` to parse the commandline.
If the project is written as a Jupyter notebook then the notebook should focus on presentation of analysis and the results, the code should be mostly imported from one or more `.py` files. The Jupyter notebook must import at least one `.py` file written.
It is important that the Python code can run, is free of significant errors, and that all functions have docstrings. Nontrivial code lines should be commented.
The report (max 10 pages) should have the following sections:
1: Introduction. A brief background and motivation to the problem addressed
2: Documentation. A guide to the user. Here it should be documented how the code/Jupyter notebook is to be used. All options should be documented. What is the purpose of the option and what kind of value is expected (type and range) if any. All input files and their formats should be documented, and the expected output should be described.
3: Code architecture. Explain the overall structure of the program. Explain the flow of data through the program. How is the input data parsed? How is the data stored in the code. What are the main elements of the code, like classes and functions.
4: Reflections. What are your thoughts about the code. What important design decisions did you make while writing the code? Are there any problems with the current code? How could the code be improved if you had more time?
5: References. If you copied more than one or two lines of code from any source, it should be documented. For websites include the data and time of access. If Large Language Models are used then include name of the model, version, and the promts used must be included.
It is allowed to use Large Language Models, LLMs, (like ChatGPT) or similar methods to write small parts of the code for the exam project. The sections of the code where these methods have been used to write all or parts of the code must be clearly marked. It is the student’s responsibility that the code is not plagiarized and does not violate any copyrights.
It is not allowed to use Large Language Models or similar methods to write any part of the report. - Aid
- All aids allowed except Generative AI
GAI is not allowed at the exam.
- Marking scale
- passed/not passed
- Censorship form
- No external censorship
More than one internal examiner
Criteria for exam assessment
As described in "Learning outcome" as well as how the report has been written up and fullfill the listed criteria.
Single subject courses (day)
- Category
- Hours
- Preparation
- 58
- Theory exercises
- 45
- Project work
- 99
- Guidance
- 4
- English
- 206
Kursusinformation
- Language
- English
- Course number
- SBIA21001U
- ECTS
- 7,5 ECTS
- Programme level
- Full Degree Master
Full Degree Master choice
- Duration
-
1 block
- Placement
- Block 2
- Schedulegroup
-
B
- Capacity
- 30
- Studyboard
- Study Board for the Biological Area
Contracting department
- Department of Veterinary and Animal Sciences
- The Novo Nordisk Foundation Center for Basic Metabolic Research
Contracting faculty
- Faculty of Health and Medical Sciences
Course Coordinators
- Jakob Hull Havgaard
(3-7a787b5083857e743e7b853e747b)
Chief responsibility - Jakob Nybo Nissen (12-726973776a3676717b7b6d76487b7d766c36737d366c73)
Er du BA- eller KA-studerende?
Kursusinformation for indskrevne studerende