Program for create the rna sequence from the dna, Programming Languages

Often, DNA sequences are represented as a sequence of characters (String) and each character in the sequence corresponds with one of four nucleotides.

A = adenine, C = cytosine, G = guanine, T = thymine

In this homework, we will work with DNA sequences and develop a program that allows the user to input an arbitrary DNA sequence and then retrieve additional information about the sequence.

Your assignment is to implement a program that does the following:

1. Ask the user for the DNA sequence

2. Validate the sequence

a. Invalid sequences contain characters other than A,C,G, or T.

b. If it is an invalid sequence, request another

3. Display a menu containing the different things we can do with this sequence.

a. Count the number of times a specific character occurs in the DNA sequence

i. The user will input the character they are interested in.

ii. You will print out the number of occurrences for that character.

b. Count the number of a pair of characters in the DNA sequence

i. The user will input the characters they are interested in.

ii. You will print out the number of occurrences for that pair of characters.

c.       Create the RNA sequence from the DNA sequence input by the user.

 i. The RNA sequence is the DNA sequence with all of the T's replaced with U's.

d. Create the complement of the DNA sequence.

i. There are two steps necessary to compute the complement of a DNA sequence

1. Reverse the DNA sequence

2. Replace all A's with T's, all T's with A's, all G's with C's, and All C's replaced with G's.

e. Quit

You will lose points if you do not create any methods other than the main method.  (Hint: The code for each menu item (other than Quit) should be its own method) Look at the Java String API for methods to help complete your tasks.

Sample Trace

> Please enter the DNA sequence:

GATCAGCCGC

> Please select from the following:

>     1. Count a character.

>     2. Count a pair of characters.

>     3. Convert the DNA to RNA.

>     4. Compute the complement.

>     5. Quit

1

> Please enter the character:

C

> The number of C's in the DNA sequence is 4

> Please select from the following:

>     1. Count a character.

>     2. Count a pair of characters.

>     3. Convert the DNA to RNA.

>     4. Compute the complement.

>     5. Quit

2

> Please enter the characters:

GC

> The number of GC's in the DNA sequence is 2

> Please select from the following:

>     1. Count a character.

>     2. Count a pair of characters.

>     3. Convert the DNA to RNA.

>     4. Compute the complement.

>     5. Quit

3

> The RNA sequence is GAUCAGCCGC

> Please select from the following:

>     1. Count a character.

>     2. Count a pair of characters.

>     3. Convert the DNA to RNA.

>     4. Compute the complement.

>     5. Quit

4

> The complement for the DNA sequence is GCGGCTGATC

> Please select from the following:

>     1. Count a character.

>     2. Count a pair of characters.

>     3. Convert the DNA to RNA.

>     4. Compute the complement.

>     5. Quit

5

> Goodbye!

Posted Date: 2/21/2013 4:14:46 AM | Location : United States







Related Discussions:- Program for create the rna sequence from the dna, Assignment Help, Ask Question on Program for create the rna sequence from the dna, Get Answer, Expert's Help, Program for create the rna sequence from the dna Discussions

Write discussion on Program for create the rna sequence from the dna
Your posts are moderated
Related Questions
In the form of hypermedia documents, Web pages or materials accessed by the Internet can be located anywhere in the world. Regardless of where they originated, most of the Web d

Play is as follows: 1.) Player places a bet a. Bet is on one of three choice i. "Player" will win ii. "Banker" will win iii. Tie between the "Player" and the "Banker

I need to do image reconstruction using Neural Network using Matlab

Write a function drawCA(aname, coords) that uses the plot3 command to draw the C α backbone of the protein. When calling this function, you should pass in the aname and coords var

Write a program that will allow the user to input the corners of a triangle. The program will draw small yellow circles for each input point, then draw the triangle and calculate t

JavaScript is "Object Oriented" like C++ or Java. (Note that Java and JavaScript are not the same language, which is a common misconception) It also has variables, which makes Java

Write a detailed description on how you would go about planning information system for an organisation

Before I describe what you are supposed to do, please remember that this programming assignment is NOT a group project. You are NOT allowed to do this with anyone else's help. This

Calculate the total price based on several key parts required to build a state-of-the-art gaming computer. The user will have the option of selecting different parts.

Overview Goals: The goals for this assignment are Design and implement instantiable classes. Use arrays of objects. Read from and write to files. Implement basic