matlab - Placing a character randomly in a bio-seq -
VYDDGYHNGN
and we are in place of 'random numbers'. In random positions along the sequence, like this:
.. Vikwaykdeedi ... Jiaik.ac.ankjian ..
< P> Is there a function or optimal solution for this function in MATLAB?
According to your observations, consider the following that:
- dots the number of Total is a random integer is divided into the nearest integer equal to 0 and close to 0.2 times the sequence length.
- Dot spaces are also distributed randomly and evenly.
code:
% // data seq = 'VYDDGYHNGN'; % // let's do m = numel (seq); % // sequence length = rand ([0 round (.2 * m)]); % / Dot number of dots p = m + n; Result = repeat ('.', 1, p); % // Start the result of all dots results (sort (random command (p, m))) = cec;
Comments
Post a Comment