splitData: Get Training and Testing data from ChIPscore objects

View source: R/GAGeneric.R

splitDataR Documentation

Get Training and Testing data from ChIPscore objects

Description

splitData splits processed ChIP data into training and testing sets.

Usage

splitData(ChIPscore,dist = c(80,20), as.proportion = TRUE)

Arguments

ChIPscore

ChIPscore object as returned by processingChIP

dist

If as.proportion is to TRUE, split the data into desired proportions. Default sets 80% training and 20% testing. If as.proportion is to FALSE,a vector of 4 numeric values describing start and end of training and testing respectively.

as.proportion

Logical describing if values provided to dist should be treated as % of training and testing or if dist should be considered as start and end of loci selected for training and testing respectively.

Value

Returns a named list of ChIPScore objects

* trainingSet = ChIPscore containing training set * testingSet = ChIPscore containing testing set.

Author(s)

Patrick C.N. Martin <pcnmartin@gmail.com

Examples


library(ChIPanalyser)
data(ChIPanalyserData)
# See GA vignette for usage 
test <- processingChIP(chip,top)
usingDist <- splitData(test, dist = c(50,50),as.proportion = TRUE )
usingIndex <- splitData(test, dist = c(1,2,3,4),as.proportion = FALSE )


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