Define function find gene that takes a DNA sequence as a parameter and finds the code for protein, that is, the sequence
Posted: Fri Apr 29, 2022 6:58 am
Then
Define function find gene that takes a DNA sequence as a parameter and finds the code for protein, that is, the sequence between ATG and terminated with TAA. DNA sequences are built of four letters A, T, G and C. For example, ATGATAACGTAT. You may assume that there is only one gene in the sequence. For example: Test Result print(find_gene('CTATGTGGTAGCTAAGT')) TGGTAGC
Complete the function main that takes a DNA sequence as a parameter and finds the code for all proteins, that is, the sequences between ATG and terminated with TAA. If the number of openings sequences is not equal the number of closing ones the message: 'Cannot find genes, incomplete sequence provided' should be printed out, otherwise the sequences of genes separated by spaces would be displayed. Note that main should use previously implemented find_gene function. For example: Test Result print(main('ATGACGTAATCTGTTATGAGGCTACTAAGTCG)) AGGCTAC ACG
Define function find gene that takes a DNA sequence as a parameter and finds the code for protein, that is, the sequence between ATG and terminated with TAA. DNA sequences are built of four letters A, T, G and C. For example, ATGATAACGTAT. You may assume that there is only one gene in the sequence. For example: Test Result print(find_gene('CTATGTGGTAGCTAAGT')) TGGTAGC
Complete the function main that takes a DNA sequence as a parameter and finds the code for all proteins, that is, the sequences between ATG and terminated with TAA. If the number of openings sequences is not equal the number of closing ones the message: 'Cannot find genes, incomplete sequence provided' should be printed out, otherwise the sequences of genes separated by spaces would be displayed. Note that main should use previously implemented find_gene function. For example: Test Result print(main('ATGACGTAATCTGTTATGAGGCTACTAAGTCG)) AGGCTAC ACG