Professional Documents
Culture Documents
Write a program that will print out the AT content of this DNA sequence.
AT content is 0.6851851851851852
2) Complementing DNA
Sample output:
TGACTAGCTAATGCATATCATAAACGATAGTATGTATATATAGCTACGCAAGTA
tCTGtTCGtTTtCGTtTtGTtTTTGCTtTCtTtCtTtTtTtTCGtTGCGTTCtT
tCaGtaCGtaatCGatatGataaaGCataCtatCtatatataCGtaGCGaaCta
tgaGtagGtaatgGatatGataaaGgatagtatgtatatatagGtaGgGaagta
tgactagctaatgcatatcataaacgatagtatgtatatatagctacgcaagta
TGACTAGCTAATGCATATCATAAACGATAGTATGTATATATAGCTACGCAAGTA
3) Restriction fragment lengths
The sequence contains a recognition site for the EcoRI restriction enzyme, which cuts at the motif
G*AATTC (the position of the cut is indicated by an asterisk). Write a program that will calculate the size
of the two fragments that will be produced when the DNA sequence is digested with EcoRI.
Sample output:
It comprises two exons and an intron. The first exon runs from the start of the sequence to the sixty-
third character, and the second exon runs from the ninetyfirst character to the end of the sequence.
a) Write a program that will print just the coding regions of the DNA sequence.
Sample output:
b) Using the data from a, write a program that will calculate what percentage of the DNA sequence
is coding.
Sample output:
78….
c) Write a program that will print out the original genomic DNA sequence with coding bases in
uppercase and non-coding bases in lowercase.
Sample outcome:
Exo1=my_dna[0:63]
Exo2=my_dna[90:]
Noncoding=my_dna[63:90]
Exon1+non_coding.lower()+exon2
Write a program that will split the genomic DNA from file genomic_dna.txt into coding and non-coding
parts, and write these sequences to two separate files.
5. Write a program that will create a FASTA file (output.txt) for the following three sequences – make
sure that all sequences are in uppercase and only contain the bases A, T, G and C.
Sequence
DNA sequence
header
ABC123 ATCGTACGATCGATCGATCGCTAGACGTATCG
DEF456 actgatcgacgatcgatcgatcacgact
HIJ789 ACTGAC-ACTGT--ACTGTA----CATGTG
Sample outcome