Implement a binary search function

Assignment Help C/C++ Programming
Reference no: EM133086626

Question:

For this homework, you will need to use the High Throughput Sequence reads dataset located on Monsoon: /common/contrib/classroom/inf503/hw_dataset.fa
• The read set is in FASTA format (see insert)
o The headers are unique and consist of the read ID number (e.g. R1) and a series of ‘copy number' values for the number of times this read is present in sample 1, 2, ... (separated by underscore "_")
o The genomic sequences consist of the following alphabet {A, C, G, T, N}

Problem 1: Arrays and Classes

Create a class called FASTA_readset. The purpose of the class will be to contain a single FASTA read dataset (so you'll need 14 instances of this object) and all of the functions needed to operate on this set. Use an array data-structure to store the genomic sequence of the given read dataset. Use character arrays (char[ ] ) to store the sequence, rather than ‘string' object (you should have an array-of-arrays object to store a single dataset). At minimum, the class must contain (15pts):
• A default constructor (zeroes everything out)
• At least one custom constructor (parses the combined file and fills in the actual data)
• A function to alphabetically sort the sequence fragments within the FASTA_readset
• A function to implement a binary search within the fragments of the FASTA_readset
• A single function to compute the statistics for the Readset (see below)
• A destructor
• Comments describing major code blocks and control structures

A. Read in the combined dataset and initialize all 14 instances of the FASTA_readset object. Hint: You may want to retain the copy count of each fragment as a separate array.

• How many unique sequence fragments are in each of the 14 datasets?
• How many total sequence fragments are in each dataset (i.e. when you consider copy numbers)?

B. Without alphabetically sorting any of the data in the FASTA_readset object compare the contents of datasets 1 and 2 (i.e. use the fragments in dataset 1 as queries to search in dataset 2). Make sure you continue to consider copy count in your answer.
• What is the ‘big O' notation of your search (linear / quadratic / cubic / etc)?
• How long does it take (in seconds) to search for all fragments of dataset 1 within dataset 2? Please note that depending on the efficiency of your algorithm, this step may take a long time. First estimate the total time using 1,000, 10,000, and 100,000 queries - if total time estimate is greater than 24 CPU hours, provide estimate rather than exact number.
• How many sequence fragments in dataset 1 are also in dataset 2? (estimate if needed)

C. Alphabetically sort the sequence fragments in each of the FASTA_readset objects and implement a binary search function to compare the contents of datasets 1 and 2 (i.e. use the fragments in dataset 1 as queries to search in dataset 2).
• What is the ‘big O' notation of your search (linear / quadratic / cubic / etc)?
• How long (in seconds) does it take to search for 1000 queries? How about 10,000 or 100,000? Does the time increase make sense? Explain the differences (if any) when compared to search times obtained as part of 1B.
• How many sequence fragments in dataset 1 are also in dataset 2?

Attachment:- dataset.rar

Reference no: EM133086626

Questions Cloud

Discuss evolution of electronic heath records : Discuss the evolution of electronic heath records and the advantages and disadvantages of manual and automated records systems.
Define acceptance and evaluation criteria : Define acceptance and evaluation criteria, describe how they are used in assessment, and provide one example of each.
Discuss three regular revenue sources : Briefly discuss three regular revenue sources and three operational expenses for a stadium/arena. Do the same thing for a one-off event using different revenue
Describe branding : Describe branding. How is globalization and branding strategy linked? What characteristics must a company have in order to effectively adopt such a strategy?
Implement a binary search function : How many sequence fragments in dataset 1 are also in dataset 2 and What is the ‘big O' notation of your search (linear / quadratic / cubic / etc)
Determining the spot rate on the euro : A U.S. importer has purchased leather wallets from a seller in Italy. The payment terms of the transaction are net 60 days.
Investigate feasibility of using virtual reality platform : Senior management at a consumer goods company wants you to investigate the feasibility of using a virtual reality platform (such as Second Life) for monthly onl
ER model constructs and the relational model constructs : Discuss the correspondences between the ER model constructs and the relational model constructs.
Explain the significance the term : Short Answers onlyIdentify and explain the significance the following term (or phrase): CSR benchmarking

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a loop that will step through the array

Write a loop that will step through the array you defined in question 1, displaying the contents of each element that doesn't contain a NULL pointer

  Correct code so that it finds the sum of 20 numbers

Correct the following code so that it finds the sum of 20 numbers.

  Developing programs using stl containers and inheritance

Write C++ code using STL container class objects and Use inheritance to facilitate programming with objects - You might have to work on the code

  A program will read six numbers and store them in an array

A program will read ten numbers and store them in an array. the program should display how many of these elements are odd and how many are even.

  Write a recursive function squares

Write a recursive function squares that takes a list of numbers, and returns a new list of the squares of those numbers.

  Implement the polyhedron interface

This assignment deals with a program takes three types of Polyhedra from an input file and constructs the appropriate objects.

  Write the propositional function

Write the propositional function based on the subsequent proposition and create a proposition by using universal quantification and existential quantification

  Produce a top-level design for your program

You are required to code the program using the C++ Programming Language. Your program should be properly laid out and should be modular, making sure that software engineering aspects of modularity and reusability as fully considered.

  Write a program that manages a linked list of records

Write a program that manages a linked list of records stored in "struct"s. An rough example should look like the program

  Calculate the net pay as the gross less the taxes

Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference.

  Displays the information about the movie

researching constructors and dimensions. Can someone assist with explaining how to code such an example

  C -programming in what ways are the

in what ways are the initializationrepetition testand update steps alike for a sentinel-controlled loop and an

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