Question: Using python make a function: encode(dna) , for it to accept only 1 seq. The input would be (A,T,C,G) It should output a nested list
Using python make a function: encode(dna), for it to accept only 1 seq. The input would be (A,T,C,G)
It should output a nested list [list1,list2,....listN], where N is the number of letters of a sequence, and each list (i) a unique list for each type of DNA letters defined as following:
- 'A', the list is [1,0,0,0]
- 'T', the list is [0,1,0,0]
- 'C', the list is [0,0,1,0]
- 'G', the list is [0,0,0,1]
- None of the letters above then it will be[0,0,0,0]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
