Title | Examen python 2020 specialized bio-informatics |
---|---|
Course | Specialised Bio-informatics |
Institution | Universiteit Gent |
Pages | 7 |
File Size | 189.9 KB |
File Type | |
Total Downloads | 47 |
Total Views | 118 |
Voor dit examen behaalde ik 17/20 in eerste zit.
De eerste twee oefeningen zijn juist, de laatste deels. ...
22-12-2020
Exam_python_10_01_2020_CaitlinDebaene
PRACTICAL EXAM PYTHON JANUARY 10TH 2020 Instructions: Every assignment has to be solved using Python code. You can use notes and notebooks from the practical sessions. You can use the internet to search for information. Every form of communication is strictly prohibited! Take your time to read all assignments. Don't panic!
file:///C:/Users/caitl/OneDrive/Documenten/Exam python 10 01 2020 CaitlinDebaene.html
1/7
22-12-2020
Exam_python_10_01_2020_CaitlinDebaene
ASSIGNMENT 1 (7 points) A primer is a short strand of RNA or DNA (generally about 18-22 bases) that serves as a starting point for DNA synthesis. It is required for DNA replication because the enzymes that catalyze this process, DNA polymerases, can only add new nucleotides to an existing strand of DNA. In the polymerase chain reaction (PCR), primers are used to determine the DNA fragment to be amplified by the PCR process. An important characteristic of PCR primers is their melting temperature, above this temperature the primer and the template separate. The melting temperature (Tm) of a DNA sequence can be calculated by:
For quantitative PCR (qPCR), primers with a melting temperature between 58°C and 60°C are preferred. Write a program to calculate the melting temperature of a DNA sequence. The program takes a DNA sequence as input and returns the melting temperature and wether this sequence is a suitable qPCR primer.
Example 1 Input: TTTAATCTGTGGCTCTTGATAATTT Output: 64°C: bad primer
Example 2 Input: GCTATTGAGCAGTATGTGTTG Output: 60°C: good primer
file:///C:/Users/caitl/OneDrive/Documenten/Exam python 10 01 2020 CaitlinDebaene.html
2/7
22-12-2020
Exam_python_10_01_2020_CaitlinDebaene
In [92]: sequence = input("What is the sequence of the primer? ") A = sequence.count("A") T = sequence.count("T") G = sequence.count("G") C = sequence.count("C") GC = G + C AT = A + T Temperature = 4*GC + 2*AT Temp = round(Temperature) if Temp < 58: print("{}°C: bad primer".format(Temp)) if 58 20 if sequence[i] == compsequence[i+5] and sequence[i+1] == compsequ ence[i+4] and sequence[i+2] == compsequence[i+3]: 21 print(sequence[i:i+6]) 22 if sequence[i] == compsequence[i+3] and sequence[i+1] == compsequ ence[i+2]: IndexError: string index out of range In [ ]:
file:///C:/Users/caitl/OneDrive/Documenten/Exam python 10 01 2020 CaitlinDebaene.html
7/7...