Develop a test function to check several cases

Assignment Help Computer Engineering
Reference no: EM131985119

Problem

1. Extract the gene names from column 9 of the GFF3 file by vectorized regular expression parsing. These gene names will be saved into a vector whose length is the total number of annotation lines in the GENCODE file. This step is an overhead needed to be run only once for the same GFF3 file.

2. Sort the gene name vector alphabetically using the sort() function in R. However, in order to track the original row number of each sorted gene, we name the vector by their row numbers before sorting. This is also a overhead step. The sorted vector should be saved for future use, and regenerated only if a new GENCODE release is to be used.

3. Write a logarithm search function to report the range of sorted names that are identical to the query gene. The input is a gene name and a sorted gene name vector. The output is a range, which is a vector of two elements -- beginning and ending indices of the query gene in the sorted vector. As the vector is sorted, all elements in the range in the vector is equal to the query gene. If the gene is not found, the function returns NULL. You will make sure that the run time must be O(log n), where n is the length of the sorted vector. The runtime must also be independent of how many times the query gene shows up in the sorted vector.

4. With the range from step 3, extract the rows of the gff3 data frame to form an new data frame which contains all annotation regarding the query gene.

5. Develop a test function to check several cases to make sure the function is correct. The test function should check more than the correct number of rows containing the give gene name, because the total number can still be correct if the exact row numbers are wrong.

6. Report the run time of the above logarithm search on the entire GENCODE annotation with three genes of your choice.

7. Report the runtime for the first three steps. Compare the run time of step 3 with the for-loop, apply, and vectorized operation implementations of linear search.

Turn in your R source code files and a summary of the run time recorded for the algorithms.

Reference no: EM131985119

Questions Cloud

How much interest will they pay over the life of the loan : Your sister just got married.She and her new husband have found a home to buy that is selling for $130,000 .
Develop a flowchart for this solution using a while loop : Develop a flowchart for this solution using a WHILE loop; Implement your solution in Matlab using good programming practices.
What would the firms return on equity be : Butters Corporation has a profit margin of 3.5 percent and its return on assets (investment) is 12.75 percent. What is its assets turnover?
Substance abuse group comprised of mostly younger : What are some ethical considerations for a group counselor when working with a substance abuse group comprised of mostly younger adults (in early 20's)
Develop a test function to check several cases : Develop a test function to check several cases to make sure the function is correct. The test function should check more than the correct number of rows.
What is the most you would pay today for a promise to repay : What single investment made today, earning 8% annual interest, will be worth $4, 300 at the end of 5 years?
Explain reasons why the stock price could be low : Review the financial performance of Skinner Industries and try to identify some possible reasons why the stock price could be low.
List all the steps used by maximum finding algorithm : List all the steps used by Maximum Finding Algorithm to find the maximum of the list 10, 12, 9, 15, 2, 14.
How large will your last payment be : Your last deposit, which will occur at the end of Year 6, will be for less than $1, 500 if less is needed to reach $10,000. How large will your last payment be?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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