Programming help need to write arrays

SoccerBoss
Category:
Programming
Price: $40 USD

Question description

Given the amino acid sequence of a polypeptide: Phe, Val, Asn, Gln, His, Leu, Cys, Gly, Ser; perform the following tasks with a Perl program: 1. Define an array that contains the amino acids in the right order (use the three letters notation, as above). Print it in one line. 2. Determine the number of amino acids in the polypeptide and print it. 3. Add the amino acid "His" to the end of the polypeptide (use the "push" function). Print the resulting array in one line. 4. Create a "mutation": replace "Gly" with "Asp" (have your program look for Gly by using a loop and replace it with Asp if found). Print the resulting array. 5. Ask the user to enter a number between 1 and the number of amino acids in the polypeptide, and print the amino acid in that position (e.g. if the user enters "4" the program should print "Gln".) 6. Create an inversion: get two positions in the sequence from the user and invert the sequence of the amino acids between them. For example, if the user enters 3 and then 6, the program should replace Asn, Gln, His, Leu with Leu, His, Gln, Asn. (Using the "reverse" function). Print the result. 7. Create a string that will contain the amino acid sequence of the resulting polypeptide, in the format Phe-Val-Asn... (use string concatenation inside a loop. Make sure not to leave a "-" before the first amino acid or after the last one). Print that string

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Duke University
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1826 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors