You are here: AU PhD  Graduate Schools Science and Technology Courses and how to sign up Scientific courses Introduction to Programming for Animal Sciences (2016)

Introduction to Programming for Animal Sciences (2016)

ECTS credits:5

 

Course parameters:
Language: English
Level of course: PhD course
Time of year: Autumn 2016, Two week presential course, 3-13 October 2016 (teaching); 14-24 October 2016 to conclude final assignment
No. of contact hours/hours in total incl. preparation, assignment(s) or the: 72 hours (30 hours of lectures + 42 hours of assignments)
Capacity limits: 20 participants

 

Objectives of the course:
The main objective is to teach students the basic logics of algorithms and programming structure.

 

Learning outcomes and competences:
At the end of the course, the student should be able to:

  1. Identify the detailed logical steps involved in solving simple programming task
  2. Devise algorithms to solve simple programming tasks
  3. Implement simple algorithms in their language of choice
  4. Deconstruct a problem into small and manageable sub-problems
  5. Assess in an empirical way and compare the performance of different ways of solving a particular problem

 

Compulsory programme
Course participation and completion of assignments

 

Course contents:
Module 1 – Introduction

  1. Introduction to course: motivation;
  2. Constructs vs. algorithms;
  3. Variable/objects classification: understand the differences between integer, real, double, logical and character;
  4. Comparing values according to type;
  5. Conversion between types;
  6. Introduce vectors (concept and usage) and factors (R type)
  7. Boolean operators and statements;
  8. Subset data given a Boolean statement.

 

Module 2 – Loops I

  1. Simple loops (‘for’ loops): limited number iterations;
  2. Iterative computation;
  3. Nested loops.

 

Module 3 – Loops II/Conditions

  1. Many operations inside a loop, logical order that operations should take place;
  2. Loops determined by some criteria (‘while’ loops);
  3. ‘If/else’ statements: write ‘if/else’ flowcharts, predict the outcome of ‘if/else’ statements;
  4. Use of ‘if/else’ statements inside loops.

 

Module 4 – Reading and writing files

  1. Files paths: working directory, absolute vs. relative paths;
  2. Opening files: reading, writing, appending;
  3. Regular and formatted output;
  4. Reading formatted data;
  5. Processing one line at a time;
  6. Reading directories;
  7. Closing errors;
  8. Error checking.

 

Module 5 – Matrices and vectors

  1. Basic operations with vectors and matrices:, adding, dot product, matrix product;
  2. Handling data frames: read and write.

 

Module 6 – Mathematical issues

  1. Missing values;
  2. Mathematical operations that are of indeterminate form: problems and solutions;
  3. Rounding;
  4. Differences between large numbers;
  5. Random numbers and seed.

 

Module 7 – Strings

  1. What is a string;
  2. Comparing strings;
  3. Strings replacements;
  4. Splitting and joining strings.

 

Module 8 – Functions

  1. Code reuse;
  2. Create functions;
  3. Function elements: name, arguments, body, return value;
  4. Within function variables and global variables;
  5. Returning success/error;
  6. Using functions inside a loop;
  7. Recursion.

 

Module 9 – Optimization and debugging

  1. Assessing the performance of a program;
  2. Tools to reduce running time;
  3. Memory cost of copying;
  4. Improving loops;
  5. Debugging.

 

Module 10 – Sorting algorithms and final considerations

  1. What is sorting;
  2. A naïve sorting algorithm;
  3. Developing and implementing sorting algorithms;
  4. Final considerations: the importance of comments, indentation and organization in a code.

 

Prerequisites:
Basic knowledge of matrix algebra

 

Name of lecturers:
Beatriz Cuyabano, Bernt Guldbrandtsen and Huiming Liu

 

Type of course/teaching methods:
The main scope of the course consists on a two week intensive course including lectures, computer exercises and assignments. A final assignment will be given at the end of the second week, to be concluded by the student within 10 days. During these days, the lecturers will be available to the students, for possible questions during the performance of the final assignment.

 

Literature:
A short brochure on matrix algebra will be sent to the students approximately 2 weeks before the course.

 

Course homepage:
None

 

Course assessment:
Satisfactory completion of assignments

 

Provider:
Center for Quantitative Genetics & Genomics (QGG), Dept. of Molecular Biology and Genetics, Aarhus University

 

Special comments on this course:
You need to bring your own laptop with R(http://www.r-project.org/), Rstudio (http://rstudio.com) installed and Eduroam working.

 

Time:
3-13 October 2016 (teaching)

14-24 October 2016 (final assignment, no lectures)

 

  • 3 October: Module 1 and 2
  • 4 October: Assignment
  • 5 October: Module 3 and 4
  • 6 October: Assignment
  • 7 October: Module 5 and 6
  • 10 October: Assignment
  • 11 October: Module 7 and 8
  • 12 October: Assignment
  • 13 October: Module 9 and 10
  • 14-24 October: Final Assignment

Place:
AU-Foulum, rooms to be defined

 

Registration:
For registration: By e-mail to beatriz.cuyabano@mbg.au.dk. Deadline Friday, 16 September 2016.

When registering, please indicate level of programming experience (none, minor, some experience, intermediate).

If you have any questions, please contact Beatriz Cuyabano (beatriz.cuyabano@mbg.au.dk)

Comments on content: 
Revised 16.05.2017