Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE DO THIS IN C, NOT C++ . I haven\'t learned pointers yet, but I just went

ID: 3625651 • Letter: P

Question

PLEASE DO THIS IN C, NOT C++.  I haven't learned pointers yet, but I just went over arrays and strings.

 

 

 

The genetic code of all living organisms is written in their DNA, which chemically is a double helix molecule. Abstractly, DNA is a double string over the characters a, c, g, t (representing four nucleic acids) where for each character a, c, g, and t on the first string there lies a complementary character t, g, c, and a on the second string, respectively.

Thus, a is complementary to t and c to g. The two complementary strings are called strands For example the following is a short DNA sequence:

aacgtttgcgcgat
||||||||||||||
ttgcaaacgcgcta

Many properties of DNA molecules are encoded as patterns of letters in their sequences thereby allowing us to compare molecular similarity and deduce molecular evolution in organisms. One important pattern in DNA is whether a sequence is palindromic, i.e. if it reads the same forward and back. E.g. aaacgttgcaaa is a palindrome.

Write a program that asks the user for an input DNA sequence, in the form of a single strand (ie a single string), repeatedly until „q? is entered. Check if the sequence is a proper DNA sequence (ie consists of only the letters A, a, C, c, T, t, G, g) and then process the sequence and produce the following output. If the sequence is a palindrome print out “This sequence is a palindrome.” If it isn't print out that it isn't a palindrome. Then, print the input sequence and its reverse complement (ie
the second strand, read back to front).

 

Here is the expected output:

$ codons

Input DNA string (use only a, A, c, C, g, G, t, T) or 'q' to exit: 

aaatttaacgatatagcaagcag

________________________________________________________________

(1) This sequence is not a palindrome.

(2) Forward sequence: AAATTTAACGATATAGCAAGCAG.

(3) Reverse complementary sequence: CTGCTTGCTATATCGTTAAATTT.

Input DNA string (use only a, A, c, C, g, G, t, T) or 'q' to exit: 

atggggaaaaagagaccctctagcataa

________________________________________________________________

(1) This sequence is not a palindrome.

(2) Forward sequence: ATGGGGAAAAAGAGACCCTCTAGCATAA.

(3) Reverse complementary sequence: TTATGCTAGAGGGTCTCTTTTTCCCCAT.

Input DNA string (use only a, A, c, C, g, G, t, T) or 'q' to exit:

ata

________________________________________________________________

(1) This sequence is a palindrome.

(2) Forward sequence: ATA.

(3) Reverse complementary sequence: TAT.

Input DNA string (use only a, A, c, C, g, G, t, T) or 'q' to exit:

ATGTGA

________________________________________________________________

(1) This sequence is not a palindrome.

(2) Forward sequence: ATGTGA.

(3) Reverse complementary sequence: TCACAT.

Input DNA string (use only a, A, c, C, g, G, t, T) or 'q' to exit: qwerty

________________________________________________________________

Input DNA string (use only a, A, c, C, g, G, t, T) or 'q' to exit: q

Explanation / Answer

here is your solution!!! #include #include void main(void) { char str[50]; int len=0,i=0,j,flag=1,flag1=0; clrscr(); printf("Enter a dna seq: "); gets(str); while(str[i++]!='') len++; for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote