Question
Please implement the 2 functions in C: //The goal of this assignment is to write a function that // translates tripled (sets of 3) DNA
Please implement the 2 functions in C:
//The goal of this assignment is to write a function that // translates tripled (sets of 3) DNA nucleotide bases to // the corresponding aminoacid // // A, C, T, G // // The sequence of these nucleotides specifies the sequence // in which aminoacids are assembled // // Each set of 3 nucleotides specifies one aminoacid in // a protein's specification. // // The goal of this exercise is for you to write a small // function that takes in a DNA sequence (a string made up // of letters ATCG in some sequence) and determines the // corresponding sequence of aminoacids. // // Note that many aminoacids can be specified by more than // one triplet! // // Aminoacid Single letter name Triplets // Isoleucine I ATT, ATC, ATA // Leucine L CTT, CTC, CTA, CTG, TTA, TTG // Valine V GTT, GTC, GTA, GTG // Phenylalanine F TTT, TTC // Methionine M ATG // Cysteine C TGT, TGC // Alanine A GCT, GCC, GCA, GCG // Glycine G GGT, GGC, GGA, GGG // Proline P CCT, CCC, CCA, CCG // Threonine T ACT, ACC, ACA, ACG // Serine S TCT, TCC, TCA, TCG, AGT, AGC // Tyrosine Y TAT, TAC // Tryptophan W TGG // Glutamine Q CAA, CAG // Asparagine N AAT, AAC // Histidine H CAT, CAC // Glutamic acid E GAA, GAG // Aspartic acid D GAT, GAC // Lysine K AAA, AAG // Arginine R CGT, CGC, CGA, CGG, AGA, AGG // // Your task is to determine whether two DNA sequences use the // same number of each type of aminoacid (the order of the // amino-acids doesn't matter here). // To that end, you need to write a function that // takes a DNA sequence and converts it to the corresponding // sequence of aminoacids, for instance if the input sequence is: // // AAGGAGTGTTTT // // Your function must return // // KECF // // Then you need to write a function that takes in two DNA // sequences and determines whether they produce the same // numbers of each aminoacid. For example, if the sequence // of aminoacids for each of the input DNA sequences is // // AATVKFAA and TAAVKAAF // // The function must return 1 (they produce the same number // of each aminoacid). However, if the aminoacid sequences // are // // TVFAAKVV and ECVAATFK // // the function will return 0 (not the same number of each // aminoacid)
#include
void DNA_sequencing(char inputDNA[1024], char outputAminoAcids[1024]) { // This function receives two strings, one that contains a sequence // of DNA nucleotides (which MUST be composed of the letters // ACGT, no spaces or other symbols can appear here!), and // updates an initially empty string 'outputAminoAcids' with the // sequence of aminoacids corresponding to the input DNA sequence // // Try to make this function as compact (fewer lines of code, more // elegant, easier to read code) as possible.
// To Do: // Complete this function }
int amino_matching(char inputDNA1[1024], char inputDNA2[1024]) { // This function receives two strings representing DNA // sequences. It returns 1 if the sequences produce the // same number of each type of aminoacid. Think carefully // about the best (simplest?) way to to this.
// To Do: // Complete this function
return 0; }
#ifndef __testing
int main() { char DNAseq1[1024]="CTTATTGTTCCAATGTGGCGGCACTACACGTGCGTTATC"; char DNAseq2[1024]="ATTTATTGTACATATCATCGTTGGATGCCCGTAATATTG"; char DNAseq3[1024]="ATCGTTTGCACGTACCACCGGTGGATGCCAGTTATTCTT"; char aminoAcids[1024]="";
printf("Input DNA sequence 1: %s ",DNAseq1); DNA_sequencing(DNAseq1,aminoAcids); printf("Output aminoacid sequence 1: %s ",aminoAcids);
printf("Input DNA sequence 2: %s ",DNAseq2); DNA_sequencing(DNAseq2,aminoAcids); printf("Output aminoacid sequence 2: %s ",aminoAcids);
printf("Input DNA sequence 3: %s ",DNAseq3); DNA_sequencing(DNAseq3,aminoAcids); printf("Output aminoacid sequence 3: %s ",aminoAcids);
if (amino_matching(DNAseq1,DNAseq2)==1) { printf("Sequence 1 matches sequence 2 in aminoacids "); } else { printf("Sequence 1 does not match sequence 2 in aminoacids "); }
if (amino_matching(DNAseq1,DNAseq3)==1) { printf("Sequence 1 matches sequence 3 in aminoacids "); } else { printf("Sequence 1 does not match sequence 3 in aminoacids "); }
if (amino_matching(DNAseq2,DNAseq3)==1) { printf("Sequence 2 matches sequence 3 in aminoacids "); } else { printf("Sequence 2 does not match sequence 3 in aminoacids "); }
return 0; }
#endif
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started