subject

In Java please:
Problem using knowledge of DNA sequences:
A) "Your program will first prompt the user to enter a single DNA sequence, which it should validate for legality (i. e., only the four valid bases) — you might do this validation by writing a function that takes a String as a parameter and returns a boolean. Re-prompt the user if the input was invalid. Once you have a valid input, compute the following statistics (each should be implemented as a separate function, called from main())."
1. Count the number of occurrences of "C".
2. Determine the fraction of cytosine and guanine nucleotides. For example, if half of the nucleotides in the sequence are either "C" or "G", the fraction should be 0.5.
3. A DNA strand is actually made up of pairs of bases — in effect, two strands that are crosslinked together. These two strands are complementary: if you know one, you can always determine the other, or complement, because each nucleotide only pairs up with one other. In particular, "A" and "T" are complements, as are "C" and "G". So, for example, the complement of the sequence "AAGGTCT" would be "TTCCAGA". Compute the complement of the input sequence.
The output should be something like this;
Sequence 1: AATCTATA
C-count 1
CG-ratio: 0.125
Complement: TTAGATAT
Sequence 2: AAGATA
C-count: 0
CG-ratio: 0.167
Complement: TTCTAT

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Write a program that asks the user to enter the name of an input file. if the file does not exist, the program should prompt the user to enter the file name again. if the user types quit in any uppercase/lowercase combinations, then the program should exit without any further output.
Answers: 3
You know the right answer?
In Java please:
Problem using knowledge of DNA sequences:
A) "Your program will first...
Questions
question
Chemistry, 19.03.2021 21:40
Questions on the website: 13722363