generateStartingPopulation: Generate Starting population for ChIPanalyser Genetic...

View source: R/GAAnalysis.R

generateStartingPopulationR Documentation

Generate Starting population for ChIPanalyser Genetic algortihm

Description

generateStartingPopulation generates a starting population with random traits for each individual

Usage

generateStartingPopulation(population,parameters,names=NULL)

Arguments

population

numeric value describing the number of individuals in the starting population.

parameters

vector or list containing each parameter that should be added to the chromosome.

names

character describing names that should be added to each individual.

Details

generateStartingPopulation generates a starting poppulation to be used in the genetic algortihm implemented in ChIPanalyser. There are two main ways a starting population can be generated:

  1. by name Using names of each parameter that should be parse to each "chromosome". The possible paramters are N, lambda, PWMThreshold, CS ( DNAAffinity or DNAAccessibility also works). CS values should also contain a numeric value associated to each chromatin state you wish to parse. e.g CS1 ... CS14 This will generate a value by sampling from a set of predefined value for each paramters.

  2. by value range Using a named list (names for each parameters). Each element of the list should contain three numeric values : length of range, min value, max value. (Internally - values are parse to runif)

Value

Returns a list of individuals with a random traits

Author(s)

Patrick C.N. Martin

Examples


## by name
param <- c("N","lambda","PWMThreshold","CS1","CS2","CS3")

pop <- generateStartingPopulation(20,param, names = NULL)

# by range 
paramValue <- list(c(10,1,1000),c(10,0,5),c(10,0,0.9),c(10,0,1),c(10,0,1),c(10,0,1))

pop <- generateStartingPopulation(20,paramValue,names= param)


patrickCNMartin/ChIPanalyser documentation built on Nov. 24, 2022, 12:02 a.m.