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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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