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

Assignment Help:

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!


Related Discussions:- Program for create the rna sequence from the dna

Matlab, want to do an image-mean. but image is and mean is so an error ...

want to do an image-mean. but image is and mean is so an error showing Error using ==> minus Number of array dimensions must match for binary array op. wat to do?

Pseudo code, I need help putting this into a flowchart constant c as Intege...

I need help putting this into a flowchart constant c as Integer = 3500 Constant CALORIESTOOUNCE as Integer = 219 Declare Sex as Character Declare Age as Integer Declare Weight as I

How will you add styles to a document, Question 1 How will you add styles ...

Question 1 How will you add styles to a document? Question2 How will you view XML in different ways? Question 3 Explain various file handling mechanism available in PERL

Sizes of the clusters influence-k-means program, Objective: to show if th...

Objective: to show if the sizes of the clusters influence the communication cost among a set on nodes Write a K-Means  program  for a set of M points randomly distributed on an

Multi-targeting .net structure, Support for Multi-Targeting The multi-targe...

Support for Multi-Targeting The multi-targeting function of Vision Facilities allows you specify the particular edition or account of the .NET Structure that is required for your p

Display & list directory contents, Normal 0 false false fal...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

MATLAB, Who can help with MATLAB?

Who can help with MATLAB?

Write an application to assign seats for each flight, ( Airline Reservation...

( Airline Reservations System ) A small airline has just purchased a computer for its new automated reservations system. You have been asked to develop the new system. You are to w

assembly lang. H.W, 1- Allocate array with 32bit 100 element 2- Prompt the...

1- Allocate array with 32bit 100 element 2- Prompt the user to enter the maximum or the upper bound of the random value 3- Read the value and use it generate random numbers to init

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd