Основная идея: я работаю в последовательностях мотивов, используя гиббс, выбирающий последний алгоритм после сохранения позиции для текущей последовательности. Мне нужно заменить эту последовательность на исходную, и для каждой итерации итерации для каждой итерации взять 3 последовательности и отклонить одну.
i have a two string this
seq={1- ACCATGACAG
2- GAGTATACCT
3- CATGCTTACT
4- CGGAATGCAT} i cut 2-4 seq by random on 7 elements and save in string name random and i take the reset character in other string the second string save the rest of character in string name reminder and except the last one
(like first seq cut as =GTATACC so the reset is GAT)
how can i do iteration for this problem to take the another three (3,4,1)and except second seq and so on ?
c ++ код:
cout << "This is the random selection after distrubtion of result (position=";
srand(unsigned(time(NULL)));
int nor = rand() % newdistrbution.size();
cout << newdistrbution[nor] << " -> " << seq[0].substr(newdistrbution[nor], cut) << ")" << endl;
random[0].swap(seq[0].substr(newdistrbution[nor], cut));//depend of big for loop to change random 0 to i
random[1].replace(0, cut, random[2]);
random[2].replace(0, cut, random[3]);
random[3].clear();