Till KTH:s startsida Till KTH:s startsida

Ändringar mellan två versioner

Här visas ändringar i "Lab 2" mellan 2015-11-02 11:18 av Lars Arvestad och 2015-11-02 12:26 av Lars Arvestad.

Visa nästa > ändring.

Lab 2

In these assignments you are expected to use Python and no additional libraries (except for standard libraries). The goal is to practice writing "pure" Python for those occasions when libraries or other good tools are not available for one reason or another.

Your code must be a Good Unix Citizen: your Python file itself is executable, files and arguments are read from the commandline (see below), and you use stdin, stdout, and stderr appropriately.

Basic assignments These basic assignments are necessary to pass Lab 2.


* Download genomes
* Computing GC content
* Comparing base composition
* Compatibility
There are also an advanced assignment available, for the possibility to raise your grade.

Reading from the commandline As an example of how to read from the commandline, consider creating a file called "reveal" with this contents

#! /usr/bin/env python import sys print sys.argv and then execute the command

chmod +x reveal to make it executable. Then, try you new program by running (for example)

reveal a b c How do you use this in this assignment?

For more details, check the book or an example available on the web.