Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python, the following script gives the following output: my_seqfile = open(/home/jorvis1/e_coli_k12_dh10b.faa) seq_contents = my_seqfile.read() seq_count = seq_contents.count(>gi) print(There were + str(seq_count) +

In python, the following script gives the following output: my_seqfile = open("/home/jorvis1/e_coli_k12_dh10b.faa") seq_contents = my_seqfile.read() seq_count = seq_contents.count(">gi") print("There were " + str(seq_count) + " sequences within the file.")

image text in transcribed

The next question is: Make a copy of your solution from #4 and instead write a function called fasta_sequence_count which does this functionality. It should accept a file name as an argument and return the number of sequence entries found within it.

I know I need to define a function to include the functionality above, but I'm stuck.

>>> seq seq my_s eqfile = open ("/home/jorvisl/e. Coll_k12-dh10b.faa") contents my seqfile . read() count = seq contents.count (">gi") - There were 4126 sequences within the file

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

More Books

Students also viewed these Databases questions

Question

4. Show the trainees how to do it again.

Answered: 1 week ago

Question

8. Praise the trainees for their success in learning the task.

Answered: 1 week ago