Question: In python I want to append and concatenate the mrna sequence. >A18178 1 caccaataaaaaaacaagcttaacctaattc >A21196 1 cggccagatcta >A21197 1 agcttagatctggccgggg >AX557348 1 gcggatttactcaggggagagcccagataaatggagtctgtgcgtccaca gaattcgcacca >AX557349

In python I want to append and concatenate the mrna sequence.

>A18178 1 caccaataaaaaaacaagcttaacctaattc >A21196 1 cggccagatcta >A21197 1 agcttagatctggccgggg >AX557348 1 gcggatttactcaggggagagcccagataaatggagtctgtgcgtccaca gaattcgcacca >AX557349 1 gcggatttactcaggggagagcccagataaatggagtctgtgcgtccaca gaattcgcacca >AX557350 1 tccgtgaaacaaagcggatgtaccggatttttattccggctatggggcaa ttccccgtcgcggagcca

In python I want to append and concatenate the mrna sequence. >A18178

1 caccaataaaaaaacaagcttaacctaattc >A21196 1 cggccagatcta >A21197 1 agcttagatctggccgggg >AX557348 1 gcggatttactcaggggagagcccagataaatggagtctgtgcgtccaca gaattcgcacca

Write a function named input_sequences(filename) that will read in sequences from a FASTA file. The file should create a list of lists that contains the tag and sequence pairs and return it. The sequence data (all consisting of the letters a, c, t, g) should appear as a single sequence. The list of lists must be of the format ( [tag, sequence], [tag, sequence], [tag, sequence]] Consider the following example FASTA file that contains 4 sequences: >A21197 1 agcttagatctggccgggg >AX557348 1 goggatttactcaggagtctgtgcgtccaca gaattcgcacca >AX557349 1 goggatttactcagtccaca gaattcgcacca >AX557350 1 tccgtgaaacaa ccggctatggggcaa ttccccgtcgcggagcca The list of lists returned from input_sequence() with the above data would be: [['A21197 1', 'agcttagatctggccgggg'], ['AX557348 1', 'goggatttactcaggagtctgtgcgtccacagaattcgcacca'], ['AX557349 1', 'gcggatttactcagtccacagaattcgcacca'], ['AX557350 1', 'tccgtgaaacaaccggctatggggcaattccccgtcgcggagcca']]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!