Reverse-complement of a dna string

Assignment Help Database Management System
Reference no: EM131238062

A DNA strand is represented by a string of the characters A, C, G, and T, each of which represents a nucleotide. Each nucleotide has its complement as indicated by this Ruby hash: NUCLEOTIDE_COMPLEMENT = { 'A' => 'T', 'T' => 'A', 'C' => 'G', 'G' => 'C' }

The reverse-complement of a DNA string is a new string in which each nucleotide is replaced by its complement and the string is reversed.

Reverse-complements are important in bioinformatics since a strand of DNA can be read in forward direction or, equivalently, its complementary strand can be read in its forward direction, which is reverse of the original string's direction.

Add the reverse_complement method to your DNA class.

In response to reverse_complement, it returns a new DNA instance representing its reverse-complement. Note also that a == b if and only if DNA instances a and b represent the same DNA strand.

>> dna1 = DNA.new('ATTGCC')

 => ATTGCC

>> dna2 = dna1.reverse_complement

=> GGCAAT

>> dna2

=> GGCAAT

>> dna1

=> ATTGCC

>> dna2.reverse_complement

 => ATTGCC

>> dna1.reverse_complement.reverse_complement == dna1

=> true

Verified Expert

This assignment involves the development of the ruby program. This program involves the use of the class and the class variable as well as the instance variable

Reference no: EM131238062

Questions Cloud

State the three parts of dalton''s atomic theory : Lavoisier named a new element "oxygen" and tried to take credit for its discovery. Who actually discovered the element, and what did that scientist call it? State the three parts of Dalton's atomic theory
What are two most striking physical properties of dry ice : State the law of conservation of mass, and give an example Who discovered the law of definite proportions? State the law, and give an example. What are the two most striking physical properties of dry ice?
Developing relationships within the community : This week you will reflect on the debate of organized sports vs. unstructured free play. Over the years, parents, teachers, and researchers have weighed the advantages and disadvantages of each in consideration as to what is most appropriate for ..
Which is the limiting reactant : Give four reasons why Lavoisier is generally designated "the father of chemistry." When a sample of A reacts with one of B, a new substance AB is formed, and no B but a little of A is left. Which is the limiting reactant?
Reverse-complement of a dna string : The reverse-complement of a DNA string is a new string in which each nucleotide is replaced by its complement and the string is reversed -  its complementary strand can be read in its forward direction, which is reverse of the original string's dire..
Analyze the benefits of a national organization : For this discussion, you will research and analyze the benefits of a national organization that offers support within the physical education domain. Choose an association to review and discuss how an educator could benefit from the various profes..
How many grams of bromine reacted, and how do you know : Refer to Exercise 10. How much phosphorus tribromide would be formed if 10.00 g of phosphorus reacted with 59.93 g of bromine, and how do you know?
How many grams of bromine reacted : In a lab experiment, 7.75 g of phosphorus reacts with bromine to form 67.68 g of phosphorus tribromide.
How many grams of carbon dioxide were produced : The resulting solution weighed 57.136 g. How many grams of carbon dioxide were produced?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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