R/shufmut.R

Defines functions shufmut

Documented in shufmut

# Shuffle Mutation
shufmut = function(y, ...){
  n = length(y)
  v = sort(sample(1:n, size=2, replace=FALSE))
  subgenes = y[v[1]:v[2]] 
  subgenes = sample(subgenes)
  y[v[1]:v[2]] = subgenes
  return(list(mutant=y, mutrange=v))
}

Try the adana package in your browser

Any scripts or data that you put into this service are public.

adana documentation built on March 18, 2022, 6:03 p.m.