0
Character string occurrence distance

Hello!

I'm trying to create a code which will be able to measure distances between nucleotide bases, like this example:

  • ATGTCAGAGAAAGAAATTTG...
  • let x be the distance between similar bases
  • x_A1 = 5, x_A2 = 2, x_A3 = 2, x_A4 = 1, x_A5 = 1, x_A6 = 2, x_A7 = 1, x_A8 = 1, etc
  • x_G1 = 4, x_G2 = 2, x_G3 = 4, x_G4 = 7, etc
  • x_C1 = ...
  • x_T1 = 2, x_T2 = 13, x_T3 = 1, x_T4 = 1, etc

Is it possible to store the DNA sequence and the distances in an array?

I tried to use the codes from https://atoms.scilab.org/toolboxes/BTD/1.1 but they have a different analysis from my example.

Please help... Thank you!


Scilab 30-01-20, 6:31 p.m. butiki
0

You may try posting this question on the BTD toolbox page as you may get a better answer.

If I understand your problem correctly you want to store a "pair" of information, in this case between DNA sequence and the distances, in an array. I think you may want to use "structures" in that case. See the following code

A = struct()

A.x_A1=5

A.x_A2=2

and so on..

To retreive the data do

A.x_A1

and it will return its value.

30-01-20, 7:47 p.m. rupakrokade


Log-in to answer to this question.