Question: in java please 5. Suppose we are interested in studying a DNA sequence which consists of four bases: A,C,G, and T. For example: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA. (a)

in java please

in java please 5. Suppose we are interested in studying a DNA

sequence which consists of four bases: A,C,G, and T. For example: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA.

(a) Write a function of the form String getRandDNA ( int n

) which creates a random string of length n. (b) Write a

5. Suppose we are interested in studying a DNA sequence which consists of four bases: A,C,G, and T. For example: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA. (a) Write a function of the form String getRandDNA ( int n ) which creates a random string of length n. (b) Write a function of the form int getBasecount(string dna, char base), where dna [] is a DNA string and base is a single character. The function returns how many times base occurs in the string. For example, in the above string, ' T ' occurs 10 times. Note: Here, you don't have to pass in the array dimension because you can get it from the strlen function. (c) Write a function called void printStats (String dna) that takes in the DNA string and prints the percentages to the screen in the following format: Sequence: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA Length: 50 Base Statistics A: 26.4 C: 44.1 G: 34.8 T: 13.6 (d) Write a function of the form String getIsolated(string dna, char base) which given a DNA string creates a new string by blanking out (convert to .) any character other than the specified base. For example, suppose base =A, then the following string will be created. dna: TGCGTGCTACCACATCATGCAGTTTTCAAAGAAGAAAGCCTCACCACAAA (e) Write a function called void viewAllisolated (String dna []) which displays all 4 isolated strings. (f) Write the function: String [] getRandDnaPopulation (int n, int pop_size) which returns an array of random DNA strings of length n. The number of DNA strings in the array is pop_size. (g) Write a function to display the population and information about the population

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!