Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 - DNA sequence operations (25 points) The DNA or deoxyribonucleic acid, is the hereditary material in almost all organisms (including humans) and it

image text in transcribed
Problem 3 - DNA sequence operations (25 points) The DNA or deoxyribonucleic acid, is the hereditary material in almost all organisms (including humans) and it carries all the information about how a living thing will look and function. The information in DNA is stored as a code made up of four chemical bases: adenine (A), cytosine (C), guanine (G) and thymine (T), DNA bases pair up with each other, A with T and C with G, to form units called base pairs A DNA sequence is basically represented as a String, for example GAACTGGGTC. Design a Java class names DnaSequenceOperations, which should contain these static methods: - public static String complementarySequence (String initialDaSequence) 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 most FrequentBase(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 sequence To Insert, 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 initialDaSequence, 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

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

1. What is the purpose of questionnaires and observational forms?

Answered: 1 week ago

Question

Which personal relationships influenced you the most?

Answered: 1 week ago