One of the most widespread and reliable forms of COVID-19 testing is called Real-time polymerase chain...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
One of the most widespread and reliable forms of COVID-19 testing is called Real-time polymerase chain reaction or RT-PCR, which analyzes samples from inside the nose to assess the current presence of SARS-CoV-2. The test works by isolating the RNA of the virus, converting the RNA to DNA using reverse transcription, and then amplifying the DNA thousands of times so it can be detected. The success of the testing is dependent on three factors [2]. sample quality: collection, preparation, transport, and RNA extraction methods primer selection: a chosen method for reverse transcribing the RNA to DNA calibration: threshold settings for instruments must be monitored and tested. You are working as a software developer in a biomedical lab where you are maintaining a set of data utilities that allows lab technicians to report the results from RT-PCR tests in order to generate statistics about SARS-CoV-2 testing. You've been told by the director that the lab has been generating a large number of incorrect results (false positives and false negatives). The program collects test results, sample quality, and calibration times from lab technicians and should only record a test result when: The sample quality is greater than .9 The time (hours) since the last calibration is less than 5. If either of these things is false the program should not record the result and should exit immediately with an error. Instructions 1. Examine the source code for the data entry program and answer the following questions: 2. Describe any problems you see with the program that would cause it to report incorrect test results? (3 points) 3. The Director would like you to adapt the program to collect information about the race, gender and income of the test subject. Please describe in English how you might do that and what some of the problems might be. (3 points) Submit a corrected and improved version of the program where the bugs are removed and where you have started to collect demographic information. (4 points) Source Code: def is_valid_sample(sample_quality): Test if the sample quality is acceptable. Returns True if the sample quality is high enough for valid test results and, False if it is not. if sample_quality >= .9: return True else: return False def is_valid_calibration(calibration_time): Test if the calibration is acceptable. Returns True if the calibration time is low enough for valid results, and False if it is not. **** if calibration_time < 5: return True else: return False def main(): total_tests = 0 positive tests = 0 while True: answer = input("Test positive? [y/n or stop]: ") if answer == "stop": break if answer="y": test result = True else: test result = False q= float(input("Sample quality: ")) t = int(input("Minutes since last calibration: ")) total_tests += 1 if is_valid_sample(q) or is_valid_calibration(t): positive tests += 1 print() print("Total tests: ", total_tests) print("Positive: ", positive_tests) print("Negative: ", total_tests - positive_tests) main() One of the most widespread and reliable forms of COVID-19 testing is called Real-time polymerase chain reaction or RT-PCR, which analyzes samples from inside the nose to assess the current presence of SARS-CoV-2. The test works by isolating the RNA of the virus, converting the RNA to DNA using reverse transcription, and then amplifying the DNA thousands of times so it can be detected. The success of the testing is dependent on three factors [2]. sample quality: collection, preparation, transport, and RNA extraction methods primer selection: a chosen method for reverse transcribing the RNA to DNA calibration: threshold settings for instruments must be monitored and tested. You are working as a software developer in a biomedical lab where you are maintaining a set of data utilities that allows lab technicians to report the results from RT-PCR tests in order to generate statistics about SARS-CoV-2 testing. You've been told by the director that the lab has been generating a large number of incorrect results (false positives and false negatives). The program collects test results, sample quality, and calibration times from lab technicians and should only record a test result when: The sample quality is greater than .9 The time (hours) since the last calibration is less than 5. If either of these things is false the program should not record the result and should exit immediately with an error. Instructions 1. Examine the source code for the data entry program and answer the following questions: 2. Describe any problems you see with the program that would cause it to report incorrect test results? (3 points) 3. The Director would like you to adapt the program to collect information about the race, gender and income of the test subject. Please describe in English how you might do that and what some of the problems might be. (3 points) Submit a corrected and improved version of the program where the bugs are removed and where you have started to collect demographic information. (4 points) Source Code: def is_valid_sample(sample_quality): Test if the sample quality is acceptable. Returns True if the sample quality is high enough for valid test results and, False if it is not. if sample_quality >= .9: return True else: return False def is_valid_calibration(calibration_time): Test if the calibration is acceptable. Returns True if the calibration time is low enough for valid results, and False if it is not. **** if calibration_time < 5: return True else: return False def main(): total_tests = 0 positive tests = 0 while True: answer = input("Test positive? [y/n or stop]: ") if answer == "stop": break if answer="y": test result = True else: test result = False q= float(input("Sample quality: ")) t = int(input("Minutes since last calibration: ")) total_tests += 1 if is_valid_sample(q) or is_valid_calibration(t): positive tests += 1 print() print("Total tests: ", total_tests) print("Positive: ", positive_tests) print("Negative: ", total_tests - positive_tests) main()
Expert Answer:
Answer rating: 100% (QA)
Heres the corrected and improved version of the program python def isvalidsamplesamplequality Test i... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
A 6 year corporate bond has a par value 1,000 and is trading at price of 94%. It pays one coupon payment per year at an annual interest of 4.80%. What is the bond's yield to maturity?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
A star of a reality TV show: Real Housewives of Tacoma bought a house for her family 3 years ago. The houses asking price was $895,000. She put 20% down payment and a local bank lent her the...
-
The assembly shown consists of pieces of sheet aluminum of uniform thickness and of total mass 1.5 kg welded to a light axle supported by bearings A and B. Knowing that the assembly rotates at the...
-
Cash flows from operating activities for both the indirect and direct methods are presented for Reverse Logic. All amounts are in thousands (000s). Required: Complete the following income statement...
-
Payroll and benefits are commonly outsourced. Discuss which parts of PM, compensation, benefits, and payroll you would consider outsourcing; justifying your views.
-
Greenwood Company manufactures two products-14,000 units of Product Y and 6,000 units of Product Z. The company uses a plantwide overhead rate based on direct labor-hours. It is considering...
-
[111] The inverse of the matrix A = 6 7 8 8 using 6 7-8 adjoint method is :
-
The director of RCM inc. plans to launch a new product. The initial investment in equipment and other fittings is $800,000. It's been a while since management thinking of launching this new product....
-
Why would management be concerned about the accuracy of product cost? how do the multiple production department and the single plantwide factory overhead rate methods differ? How does activity based...
-
Anna wants to borrow $15,000 to buy a used sail boat. After looking at her financial situation, she realizes that she can only afford monthly payments of $300. The bank is offering financing at 6.1%....
-
Explain the strengths of Evergreen fibreboard company and Arauco company and associate the Evergreen Fibreboard company and Arauco company with a joint venture in manufacturing.||
-
Several countries in the European Economic Union (EU) have experienced difficulty paying their debts over the past decade. Greece almost defaulted (didn't make its monthly payments) during 2010 and...
-
What implications did the suspension of dividends have on the Group's valuation? from the case study: Dilemma of More Dividend Now or Stronger Stock Later: What's Next for HSBC?
-
Shares of Walmart are trading at $95 per share. A put option with strike price of $100 is currently selling for $2. What is the intrinsic value of the put option?
-
34. || If a compass is placed above a A. current-carrying wire, as in Figure B Q24.34, the needle will line up with the field of the wire. Which of C. the views shows the correct orien- D. tation of...
-
A number of years ago the United Food and Commercial Workers Union organized 800 workers of the 1035 employees at one of the Wilson Brothers food operations in Toronto, Ontario. The employees include...
-
Discuss whether a natural population of wolves or a domesticated population of German shepherds is more likely to have a higher heritability for the trait of size.
-
Make a list of possible research questions that could be answered using site-directed mutagenesis.
-
Let's suppose you are in charge of organizing and publicizing a genomic database for the mouse genome. Make a list of innovative strategies you would initiate to make the mouse genome database useful...
-
Donna Corporation manufactures custom cabinets for kitchens. It uses a normalcosting system with two direct-cost categoriesdirect materials and direct manufacturing laborand one indirect-cost pool,...
-
Donna Corporation manufactures custom cabinets for kitchens. It uses a normalcosting system with two direct-cost categoriesdirect materials and direct manufacturing laborand one indirect-cost pool,...
-
Donna Corporation manufactures custom cabinets for kitchens. It uses a normalcosting system with two direct-cost categoriesdirect materials and direct manufacturing laborand one indirect-cost pool,...
Study smarter with the SolutionInn App