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

  Constructing truth table of converter circuit

Construct the truth table of the converter circuit using character a , b, c and d (d represents Least Significant Bit) in order to denote the literals input of BCD. Use w, x, y and z (z as Least Significant Bit) in order to represent the output li..

  How does dep prevent malicious attacks via buffer overflows

How does DEP prevent malicious attacks via buffer overflows? Is it always effective? Why might a user or administrator disable DEP?

  Create a program that reads an exchange rate

Write a program that reads an exchange rate for converting English currency to U.S. currency and after that reads several values in English currency and converts each amount to the equivalent U.S. currency.

  Write a class that encapsulates a deck of cards

Write a class (and a client class to test it) that encapsulates a deck of cards. A deck of cards is made up of 52 cards. You should have three instance variables.

  How three independent tosses of balance coin can be modelled

Demonstrate how three independent tosses of a balanced coin can be modelled by two rolls of a balanced die (with six faces).

  What is the maximum frequency error that would be permitted

If the maximum phase rotation permitted is 10°, what is the maximum frequency error that would be permitted as a fraction of the symbol rate?

  Make numeric buttons for numbers input

create the Calculate button the Accept button.make numeric buttons for numbers input

  What is the maximum permitted burst length

An asynchronous transmission system employs unsynchronized transmitter and receiver clocks, both of which are controlled by quartz crystals.

  Determine the new sample size to examine

Sample Size Determination. Jule Phillips is examining the internal control of Cowboy Company and has identified the mathematical verification of sales invoices.

  Assuming that your group is in the testing phase of the

imagine that you are the head of the design team for a new video game concept.assuming that your group is in the

  Can you devise a meet-in-the- middle attack for a triple des

If the key with parity bit (64 bits) is 0123 ABCD 2562 1456, find the first round key. Can you devise a meet-in-the- middle attack for a triple DES?

  Which products must be restocked

The database includes fields for record number, store identification number, sales region, item number, item description, unit price, units sold, and weekly sales period when the sales were made.

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