Hello can someone help me in programation of position weight matrix? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hello can someone help me in programation of position weight matrix?

16th Nov 2019, 12:59 PM
Minette
Minette - avatar
6 Answers
+ 3
Can you clearify your question?
16th Nov 2019, 12:59 PM
Asman-H
Asman-H - avatar
+ 3
Your attempt?
16th Nov 2019, 1:07 PM
Asman-H
Asman-H - avatar
0
I have 3 sequence I wanna to compare between their first letters and write for example if I find " A " and " T" I write "W" I haven't find the code of this explication
16th Nov 2019, 1:05 PM
Minette
Minette - avatar
0
Sequence1=input('the first sequence is:') N=len(sequence1) Print('size of DNA sequence1 is:',N) Sequence2=input('the first sequence is:') N=len(sequence2) Print('size of DNA sequence2 is:',N) Sequence3=input('the first sequence is:') N=len(sequence3) Print('size of DNA sequence3 is:',N) For K in range (0,N): If sequence1[1]== A or T and sequence2[1] == A or T: Print ('W') I know it's wrong in ( for .... N ) because We have 3 seq withe their cases in the first position we need to know , if we have (A or T) than we put (W)
16th Nov 2019, 1:18 PM
Minette
Minette - avatar
0
This code will replace all 1 and 2 in sequences with 3. Try using this logic to make your own code: # Input 3 sequences seq1, seq2, seq3 = input(), input(), input() def main(x): if x in ['1', '2']: return '3' else: return x newseq1 = list(map(main, seq1)) newseq2 = list(map(main, seq2)) newseq3 = list(map(main, seq3)) https://code.sololearn.com/c9EPl6YrL7A5/?ref=app
16th Nov 2019, 4:18 PM
Asman-H
Asman-H - avatar
0
Thank u so much but how I code for chosing the first position of all sequence and decide if they are A + T I write W
16th Nov 2019, 6:25 PM
Minette
Minette - avatar