Entering edit mode
8.9 years ago
gizemtatar
•
0
My input;
seq1="GCATGCU"
seq2="GATTACA"
n=length(s1string) #seq1
m=length(s2string) #seq2
This matrix
D <- matrix(0,nrow=m+1, ncol=n+1)
seq1 and seq2 length = 7 but I must create matrix 8x8:
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0 -1 -2 -3 -4 -5 -6 -7
[2,] -1 1 0 -1 -2 -3 -4 -5
[3,] -2 0 0 1 0 -1 -2 -3
[4,] -3 -1 -1 0 2 1 0 -1
[5,] -4 -2 -2 -1 1 1 0 -1
[6,] -5 -3 -3 -1 0 0 0 -1
[7,] -6 -4 -2 -2 -1 -1 1 0
[8,] -7 -5 -3 -1 -2 -2 0 0
I want to define matrix ncol with s1string, nrow= s2string but start colname and rowname [2, ], [,2]. For example, [,2]="G" [,3]="C" [,4]="A" [,5]="T" [,6]="G" [,7]="C" [,8]="T"
. I don't want define in this [1,1]. Can you help me for this topic?