Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c++ For this assignment, you will build a simple analysis program that will compute basic statistics for a list of DNA strings. Your program

In c++ image text in transcribed
For this assignment, you will build a simple analysis program that will compute basic statistics for a list of DNA strings. Your program should work as follows: The program will accept as a command line argument the name of a text file that will contain an arbitrary list of DNA strings. (ie. JassignI/filename.txt) DNA strings consist of a sequence of nucleotides (A,C,T, or G). There will be 1 string per line of the file. No guarantees on capitalization. -The program the DNA strings in the list. It will also compute the relative probability of each nucleotide (A,C.T, or G), as well as the probability of each nucleotide bigram (AA, AC, AT, AG, CA, CC, CT, CG, ete) across the entire collection. -The program will output the labeled results to a file called yourname.out. At the top of the file, output your name, student id, etc. -After printing the summary statistics to yournam whose lengths follow a Gaussian distribution with the same mean and variance as calculated above. The relative frequency of nucleotides will also follow the statistics calculated above Append the 1000 strings to the end of yourname.out. -The program will then ask the user if they want to process another list. -If not, the program will exit. If so, the program will prompt for the name of the next file, process it, and append the results to the output file. will then compute the sum, mean, variance, and standard deviation of the length of e.out, you will generate 1000 DNA strings Hints To generate the length of a string from a Gaussian distribution with mean u and variance , you can use the rand ( ) function (normalized-see RAND-MAX) to generate 2 random numbers, a and b, uniformly distributed in [0.1). Using the Box-Muller transform it is then possible to compute a random variable C, such that: C- sqrt(-2 In (a)) cos(2nb) Here C is a standard Gaussian with mean 0 and variance 1. You can then convert to a normal random variable D with mean and variance 2 as follows: Note that here we use the standard deviation, o, which as you know from basic statistics is simply the square root of variance. The Rules You may NOT use any non-primitive data structures to do the math. (No arrays Vectors, Lists, etc) Just use individual primitive variables (int, double, etc) and std strings. Hopefully this will convince you that data structures make programs more

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Many different people can conduct performance appraisals.

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago