0
Hello can someone help me in programation of position weight matrix?
6 Respuestas
+ 3
Can you clearify your question?
+ 3
Your attempt?
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
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)
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
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