Question 1a: Define a function make_fasta_list_from_file that takes a single parameter, subject, the name of a fasta file. This function should: Read in the fasta file specified by the string subject • Read each line from the file into a list named fasta_list. Each line should be a different element of the list, with the \n character stripped. • Return fasta_list ... fasta list make_fasta_list_from_file('a_tridentata.fasta')

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Answer Q1a only.... please fast

Help
her
X 00
]: ...
▼
X
▶
hw08.ipynb
■ с
[ ]: ...
Code
v
fasta_list = make_fasta_list_from_file('a_tridentata.fasta')
]: grader.check("qla")
['KX676677.1',
X
E query_list_2.txt
Xx
Question 1a:
Define a function make_fasta_list_from_file that takes a single parameter, subject, the name of a .fasta file. This function should:
Read in the .fasta file specified by the string subject
Read each line from the file into a list named fasta_list. Each line should be a different element of the list, with the \n character stripped.
Return fasta_list
[]: grader.check("q1b")
E query list.txt
▪ Generate a new list, fasta_trim, that contains the Sequence ID with the Sequence and no >.
Return fasta_trim
The list should start like this:
fasta_trim = trim_fasta(fasta_list)
X
Question 1b:
• The Sequence ID lines (those starting with >) need to be cleaned up, as we only want the Sequence ID (e.g. KX676677.1) not the character.
• Create a function trim_fasta that takes in a single parameter, a list of sequences input_list. The function should:
Hint - How can you break up the first line into its components, then remove the > ?
(
seqlen gescatter.svg
X
seqlen.svg
'ATACCTTACCCAGCCCATCTGGAAATCTTGGTTCAGGCTCTTCGCTATTGGATAAAAGATGCTTCCTCTTTGCATTTATTAAGATTATTTCTCCATGAGTATCATAATTGGGATAGTCTTATTACTTCAAATTCAAAGAAAGTTAGT
XE a tridentata.fast-
Python 3 (lpy
4
Transcribed Image Text:Help her X 00 ]: ... ▼ X ▶ hw08.ipynb ■ с [ ]: ... Code v fasta_list = make_fasta_list_from_file('a_tridentata.fasta') ]: grader.check("qla") ['KX676677.1', X E query_list_2.txt Xx Question 1a: Define a function make_fasta_list_from_file that takes a single parameter, subject, the name of a .fasta file. This function should: Read in the .fasta file specified by the string subject Read each line from the file into a list named fasta_list. Each line should be a different element of the list, with the \n character stripped. Return fasta_list []: grader.check("q1b") E query list.txt ▪ Generate a new list, fasta_trim, that contains the Sequence ID with the Sequence and no >. Return fasta_trim The list should start like this: fasta_trim = trim_fasta(fasta_list) X Question 1b: • The Sequence ID lines (those starting with >) need to be cleaned up, as we only want the Sequence ID (e.g. KX676677.1) not the character. • Create a function trim_fasta that takes in a single parameter, a list of sequences input_list. The function should: Hint - How can you break up the first line into its components, then remove the > ? ( seqlen gescatter.svg X seqlen.svg 'ATACCTTACCCAGCCCATCTGGAAATCTTGGTTCAGGCTCTTCGCTATTGGATAAAAGATGCTTCCTCTTTGCATTTATTAAGATTATTTCTCCATGAGTATCATAATTGGGATAGTCTTATTACTTCAAATTCAAAGAAAGTTAGT XE a tridentata.fast- Python 3 (lpy 4
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY