PYTHON-Assume you have a file that has two columns separated by a comma. The first column contains gene accession numbers, and the second column contain their nucleotide sequence. For example: ABC123, AAGTCTTCCCTAAGCCC... KHJ456, TTCGGTCATACTATTC... NMG789, GCTACTCGATGCTA.... .... The file can contain any number of rows. Write a program that reads in this file (you can create one to test your code with, use TextEdit or Notepad) and creates a dictionary, where the keys are the accession numbers and the values are the sequences. Print out to the screen the dictionary pairs that you created.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.5: A Case Study: Pollen Count File Update
Problem 3E
icon
Related questions
Question

PYTHON-Assume you have a file that has two columns separated by a comma. The first column contains gene accession numbers, and the second column contain their nucleotide sequence.

For example:

ABC123, AAGTCTTCCCTAAGCCC... KHJ456, TTCGGTCATACTATTC... NMG789, GCTACTCGATGCTA.... ....

The file can contain any number of rows.

Write a program that reads in this file (you can create one to test your code with, use TextEdit or Notepad) and creates a dictionary, where the keys are the accession numbers and the values are the sequences.

Print out to the screen the dictionary pairs that you created.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

what function are you using to read into the file 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT