Frequent k-mer problem

Assignment Help Database Management System
Reference no: EM131268851

Problem 1:

We return to the DNA class from Assignment 3. The most frequent k-mer problem seeks the set of substrings of length k (where integer k is an input) that occur most frequently. We add to the DNA class a most_frequent_kmers method that gets called with integer k and returns an array whose first element is the set of k-mers that occur most frequently in this DNA and whose second element is the number of times each one appears.

>> dna1 = DNA.new('ATTGATTCCG')
=> ATTGATTCCG
>> dna1.most_frequent_kmers(1)
=> [#<Set: {"T"}>, 4]
>> dna1.most_frequent_kmers(2)
=> [#<Set: {"AT", "TT"}>, 2]
>> dna1.most_frequent_kmers(3)
=> [#<Set: {"ATT"}>, 2]
>> dna1.most_frequent_kmers(4)
=> [#<set: {"ATTG", "TTGA", "TGAT", "GATT", "ATTC", "TTCC", "TCCG"}>,
1]

Attachment:- Assignment 3 problem.rar

Verified Expert

This assignment deals with the use of hashMap, set and the array in ruby. This program returns the maximum substituting occurring in the string whose length is equal to the supplied to the function.

Reference no: EM131268851

Questions Cloud

Billing function of a company : A bank has recently taken over the billing function of a company. An agreement stipulates that the bank should process 99.2% of the bills within 4 hours.
How language and literacy development is fostered : Imagine that you are asked by a new parent or family member to explain how language and literacy development is fostered in a preschool setting.
Determine the floating exchange rate : With the heavy focus on trade with China, it may be surprising to discover that Canada is the USA’s largest trading partner. Perhaps it is not the amount of trade between the US and China that is such a great concern as much as the growth of the trad..
Managing diversity and inclusion and diversity training : Explain the relationship between “managing diversity and inclusion” and “diversity training.” Which is most effective? Why
Frequent k-mer problem : The most frequent k-mer problem seeks the set of substrings of length k (where integer k is an input) that occur most frequently
Calculate the amount that amy would pay : Amy Koy met Pat Quin on September 8 at Queen Bank. After talking with Pat, Amy decided she would like to consider a $9,000 loan at 10 1/2% to be repaid on February 17 of the next year on exact interest. Calculate the amount that Amy would pay at m..
Create powerpoint presentation describing : Write an MS Word document or create a PowerPoint presentation describing:
Net income will go to federal and state taxes : US Airways has a net income before taxes of $60,000. It's expected the t45% of the net income will go to federal and state taxes. How much will US Airways have left?
Legacy system replacement baseline project plan : You are a systems analyst working for Laggard, Inc. (Laggard), a wholesale distributor of bulk vitamins and fine chemical food additives. Laggard has stayed way behind the IT industry evolutionary curve. Produce a legacy system replacement Baseline P..

Reviews

len1268851

11/7/2016 4:36:04 AM

I NEED THIS PROBLEM BY TOMORROW CAN YOU DO THAT. IF YES THEN GIVE ME THE PRICING THEN I WILL PAY. IF CANNOT BY TOMORROW THAN THANK YOU. IAM HAVING DUE BY TOMORROW EVENING SO.

Write a Review

Database Management System Questions & Answers

  Create a simple form for the sales rep table

Determine whether changes to the format of a datasheet are desirable - Determine whether validation rules, default values, and formats are necessary.

  Key value of fourth index record on top level

What is the key value of the 4th index record on the top level, assuming each index record points to the record with the highest key value in a block of the next level down?

  Imagine that you have been hired as a consultant to assist

imagine that you have been hired as a consultant to assist in streamlining the data processing of an international

  Create a dtd file and an xsd file that specify the schemas

Create an XML file that describes 3 product elements; each product has three sub-elements: id, name, and description.

  Explain how the web user interfaces help donors

Explain how the Web user interfaces help donors to make decisions

  Most spreadsheet software like that shown in the

most spreadsheet software like that shown in the accompanying figure includes a kind of analysis tool where users can

  Implement direct-address table keys of stored elements

Suggest how to implement direct-address table in which keys of stored elements don't require to be distinct and elements can have satellite data.

  Write a program that keeps an employee database

Write a program that keeps an employee database in a random-access file. Implement functions for adding and removing employees. You need not keep employees in sorted order.

  Draw a context diagram of the computerised inventory system

Draw a Context Diagram of the Computerised Inventory System at The Variety Store from the perspective of the Purchasing Department. Please complete using the DIA software and also in word document.

  How does oracle process query

How does Oracle process this query? That is, what does Explain Plan tell you about how the query is processed - how would you recognize that the results were not correct?

  Create a database from scratch

Create a database from scratch that contains, at a minimum, the elements listed below

  Explain how to derive new classes from base classes

Explain how to derive New Classes from Base Classes. Describe classes, including constructors, methods, data, value, and reference types. Provide examples and uses in VB & C# languages.

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