From a247279d19e8785c34b8d15c6b58ce2f71672db7 Mon Sep 17 00:00:00 2001 From: Lukas Kall Date: Mon, 14 Aug 2023 17:20:37 +0200 Subject: [PATCH] ok --- prog/p1/labp1.py | 4 ++-- prog/p1/readme.md | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/prog/p1/labp1.py b/prog/p1/labp1.py index cbcf2a8..29c83fb 100644 --- a/prog/p1/labp1.py +++ b/prog/p1/labp1.py @@ -13,7 +13,7 @@ # Edit this function to return the amino acid sequence of a provided DNA sequence def dna2aa(dna_str): - aa_str = '' + aa_str = 'WAITING FOR IMPLEMENTATION' return aa_str # A dictionary converting codons to amino acids @@ -75,6 +75,6 @@ def dna2aa_fasta(dna_filename, protein_filename): # Test code for the dna2aa function. # Will only be executed if this file is run directly e.g. with "python labp1.py" if __name__ == "__main__": - dna2aa("ATGATGATG") + print(dna2aa("ATGATGATG")) dna2aa_fasta('cdna.faa', 'output.faa') diff --git a/prog/p1/readme.md b/prog/p1/readme.md index 6a0b9d3..ac0fa93 100644 --- a/prog/p1/readme.md +++ b/prog/p1/readme.md @@ -1,8 +1,6 @@ # Programming Lab P1 -This is an introductory lab for the programming part of the course. -Your task is to write a function that can convert DNA sequence to amino acid sequence. -To your help you have a scaffold of python code that you should use as to validate your code and also to make sure you follow a standard that the TAs can automatically validate. +This is an introductory lab for the programming part of the course. Your task is to write a function that can convert DNA sequence to amino acid sequence. To your help you have a scaffold of python code that you should use as to validate your code and also to make sure you follow a standard that the TAs can automatically validate. ## Preparations @@ -12,10 +10,10 @@ If you are not yet familiar with the VScode software, watch for example this [sh ### Code Installation -Begin with downloading the project to your local computer by using this [link](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fkth-gt%2Fcb2442%2Ftree%2Fmain%2Fprog%2Fp1). +Begin with downloading the project to your local computer by using this [link](https://download-directory.github.io/?url=https%3A%2F%2Fgithub.com%2Fkth-gt%2Fcb2442%2Ftree%2Fmain%2Fprog%2Fp1). +Unzip the files into a directory and open the directory in VScode. -Unzip the files into a directory and open the directory in VScode. ```bash $ unzip 'kth-gt cb2442 main prog-p1.zip' $ code . @@ -34,16 +32,16 @@ Also, set the list `authors` to contain all the group members names. ### Test -You can make an initial execution of your `dna2aa` function by running the ain function of the python file itself by executing the line, +You can make an initial execution of your `dna2aa` function by running the python file itself directly as top-level code by executing the line, ```bash -$ python3 labp1.py +$ python labp1.py ``` -However ther final test of the code is done by executing the `runner.py` executable, which can be exected from command line as, +However ther final test of the code is done by executing the `runner.py` executable, which can be exected from command line as, ```bash -$ python3 runner.py +$ python runner.py ``` or just @@ -57,4 +55,4 @@ If you implemented the function right, you will see your names apearing. ### Extra excercise -Change the behaviour of `dna2aa` so that it tries all thre possible frames of translation, and selects the amino acid sequence that has the longest orf of the three alternatives. \ No newline at end of file +Change the behaviour of `dna2aa` so that it tries all thre possible frames of translation, and selects the amino acid sequence that has the longest orf of the three alternatives.