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

Program for adding a course in the website of a university, 1. You are work...

1. You are working as a designer for a university that offers a program in Computer Science. One of the tracts is computer security. One of your colleagues has recommended adding a

Develop an html document with a nested list, 1. Develop a Web page, indicat...

1. Develop a Web page, indicating an ordered list of the names of your five friends. 2. Develop an HTML document with a nested list indicating the content page of any book 3.

Write your own version of the strcmp function string_compare, Write your ow...

Write your own version of the strcmp function string_compare. Supply a main program that will test each of the 3 differing outcomes. int string_compare(char *s, cha

Write a program that will input two number from the keyboard, Write a progr...

Write a program that will input two numbers from the keyboard and execute each of the signed and unsigned multiply and divide instructions.  For each instruction, the program shoul

Program that takes names of 5 students in 2d character array, Write a progr...

Write a program that takes names of 5 students in 2D Character Array and their GPAs in 1D array. Arrange the names in alphabetical order and display on screen along with GPA.

Program to built book recommendation system, 1 Problem Description The...

1 Problem Description The task of the assignment is to build a book recommendation system for Auer Libraries. The system is to be implemented in Prolog and as the owners of t

Ajax and php, would you like to see some of my code. I am trying to do an a...

would you like to see some of my code. I am trying to do an add friend request. when I view my friends page I click on the add button. with ajax I want the script to send over the

Create application for a book store, You need to create a simple applicatio...

You need to create a simple application for the Note Plus book Store. The interface for the application is shown below:   REQUIRED: 1)  Create all necessary contro

Decision table, If it is a weekday and it is not a holiday, then you go to ...

If it is a weekday and it is not a holiday, then you go to work. However, if it is a weekday and it is a holiday, then what you do depends on the weather. If it is raining, you pla

Looping, You are required to develop a program that calculates the charges ...

You are required to develop a program that calculates the charges for DVD rentals, where current release cost RM3.50 and all others cost RM2.50. If a customer rents several DVDs, e

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