Counting Severe Acute Respiratory Syndrome coronavirus 2 genome bps: Download the FASTA file (NC_045512.2) containing the SARS-CoV-2...

Free

60.1K

Verified Solution

Question

Programming

  1. Counting Severe Acute Respiratory Syndrome coronavirus2 genome bps: Download the FASTA file (NC_045512.2)containing the SARS-CoV-2 reference sequence. (You can use the\"Send\" widget on the upper-right corner of the NCBI Web pagecontaining the genome to download a FASTA file.) Now, write aPython program that reads the file, stores the sequence withoutwhite characters (spaces, end-of-line, etc.), and prints out thenumber of nucleotides (bps) in the complete SARS-CoV-2 genome.

Answer & Explanation Solved by verified expert
3.9 Ratings (782 Votes)

Here is the code:

f = open (\"NC_045512.2.fna\")
f.readline() # Ignore the header
c = f.readlines ()

l = \"\"
for e in c:
l += e.strip()

print (len(l))
#--- E N D O F C O D E

29903                                                                                                                         

                                                                                                                              

                                                                                                                              

...Program finished with exit code 0

The NCBI site also shows 29903 as the number of bps, confirming above answer:

Severe acute respiratory syndrome coronavirus 2 isolate Wuhan-Hu-1, complete genome

Severe acute respiratory syndrome coronavirus 2

29,903 bp genomic sequence

  • NC_045512.2

Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students