Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a Java class names DnaSequenceOperations, which should contain these static methods: - public static String complementarySequence(String initialDnaSequence) which returns the complementaty DNA sequence of

Design a Java class names DnaSequenceOperations, which should contain these static methods:

- public static String complementarySequence(String initialDnaSequence) which returns the complementaty DNA sequence of the given DNA sequence. For example if the input is TCCAGTTACGC, the output should be: AGGTCAATGCG - public static char mostFrequentBase(String dnaSequence) which finds the most frequent base (i.e. the base that has the largest number of appearances). For example if the input is TCCAGTTACGC, the output should be: C. (In case of equal frequencies, you may return any of the bases having the same frequency). - public static String insert(String initialDnaSequence, String sequenceToInsert, int position) which returns a DNA sequence formed by inserting the given sequence in the given initial DNA sequence. For example if the input consists of TCCAGTTACGC (as the initial sequence), GATCGA (as the sequence to insert) and 7 (as the position), then the output should be: TCCAGTTGATCGAACGC. -public static String remove(String initialDnaSequence, String patternToRemove) which returns a DNA sequence formed by removing the first occurrence of the given DNA pattern from the initial DNA sequence. -public static String decompress(String compressedDnaSequence) which forms a standard DNA sequence from a compressed sequence. A compressed DNA sequence may have numbers and brackets which show how many times the preceding token is repeated. For example, if the compressed sequence is AD3CTG4AC(DAG)3CT2A, then the result (the standard DNA sequence) will be: ADDDCTGGGGACDAGDAGDAGCTTA. For simplicity, just consider the cases without nesting

PLEASE EXPLAIN YOUR CODE ! ! !

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Explain the focus of safety programs.

Answered: 1 week ago

Question

LO2 Discuss important legal areas regarding safety and health.

Answered: 1 week ago