Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In my home area you'll find the following file '/home/jorvis1/e_coli_k12_dh10b.faa', which is in FASTA format. Write a script to count the number of sequence entries

In my home area you'll find the following file '/home/jorvis1/e_coli_k12_dh10b.faa', which is in FASTA format. Write a script to count the number of sequence entries within this file and report the count like:

There were 4126 sequences within the file.

This is what I have so far. I don't get an error, but nothing prints.

#!/usr/bin/env python3

count = 0

for line in open('/home/jorvis/e_coli_k12_dh10b.faa'):

count = count + 1

if line.startswith(">"):

print(" There were " + str(count) + " records in 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

Students also viewed these Databases questions

Question

What is an interface? What keyword is used to define one?

Answered: 1 week ago