Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is what I have so far This is where we check if our work is correct before running it on a bigger file Part

image text in transcribed
image text in transcribed
This is what I have so far
image text in transcribed
This is where we check if our work is correct before running it on a bigger file
Part 2a: Count nucleotides Augment your program so that it also computes and prints the number of A nucleotides, the number of T nucleotides, the number of G nucleotides, and the number of C nucleotides. When doing this, add at most one extra loop to your program. You can solve this part without adding any new loops at all, by reusing an existing loop. Check your work by manually computing the results for file test-small.fastq, then comparing them to the output of running your program on test-small.fastg Run your program on sample_1.fastq. Cut-and-paste the relevant lines of output into answers.txt (the lines that indicate theG count, C count, A count, and T count). 3 # Total nucleotides seen so far. totalcount 0 # Number of G and C nucleotides seen so far. # for each base pair in the string, 0 for bp in seq: 1 # increment the total number of bp's we've seen totalcount = totalcount + 1 # next, if the bp is a G or a C, gc count gc_count 1 0 gc_content float(gc_count)/total_count - - 4 # increment the count of gc 9 # divide the gc-count by the total-count # Print the answer 3 print ("sc-content:", gc_content) 4 5 total count 0 6 atcount=0 - 8 for bp in seq: 9 totalcount += 1 if bp in 'AT' - at_count +1 2 at_content float(at_count)/ total_count 3 print('AT content:'at content test-small.fas test-small.fastq 1 ignore this line 2 ATCAGAACTA 3 ignore this line 4 ignore this line

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Make A Database In Historical Studies

Authors: Tiago Luis Gil

1st Edition

3030782409, 978-3030782405

More Books

Students also viewed these Databases questions