Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def process-file-dict(filename): # Given a file name in string object, you need to open this file and save sequence # names as keys in a

image text in transcribed
image text in transcribed
image text in transcribed
def process-file-dict(filename): # Given a file name in string object, you need to open this file and save sequence # names as keys in a dictionary, and sequences as the corresponding values. # Then, your function will return a dictionary. # The returned dictionary is named as seq-dict seq dict-l return seq_dict In your main part of your script, you need to (1) Call the function process_ file dict () by providing the required argument-the fasta file name Assignment02.fasta' as the unnamed string object and obtain a named dictionary that contains both sequence name and sequences. Now, you need to navigate each key of the dictionary (i.e., sequence name) and retrieve the corresponding value that is the sequence. Then, using the sequence to call your function nucleotide_counter ()to get another dictionary containing nucleotides and their counts, as well as a float object for GC content. Then, you need to print the result for all the sequences in the fasta file ('Assignment02.fasta'): 1. Result for calling the function named process file_dict () Seq Name-[Seql): sequence (GGAAGGA.CAGACA) # You need to print out the complete sequence, not ,.. A count [35) T count (151 G count (33) c count GC content [66.674] # You do need to use present float number into by .. formato The underlined parts are changeable # Other parts must be the same as described Seq Name= [Seq2]: sequence (TTAACC CACCCC) # You need to print out the complete sequence, not A count [30] T count (201 G count [301 c count (201 GC content [508) The underlined parts are changeable # Other parts must be the same as described # You do need to use present float number into % by .. format() show results for seq3 and Seq4

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

Comment should this MNE have a global LGBT policy? Why/ why not?

Answered: 1 week ago