Learn R Programming

methylKit (version 0.99.2)

extract: extract parts of methylRaw,methylRawDB,methylBase,methylBaseDB and methylDiff data

Description

The function extracts part of the data and returns a new object.

Usage

# S4 method for methylRaw,ANY,ANY
[(x, i, j)

# S4 method for methylBase,ANY,ANY [(x, i, j)

# S4 method for methylDiff,ANY,ANY [(x, i, j)

# S4 method for methylRawDB,ANY,ANY [(x, i, j)

# S4 method for methylBaseDB,ANY,ANY [(x, i, j)

# S4 method for methylDiffDB,ANY,ANY [(x, i, j)

Arguments

i

a numeric or logical vector. This vector corresponds to bases or regions contained in methylKit objects.The vector is used to subset the data.

j

This argument can not be used for the extraction of columns. As unintentional extraction of the columns will cause an error in the downstream analysis. Using this argument will cause an error. Use getData to access the data part of the objects.

Examples

Run this code
# NOT RUN {
data(methylKit)

# selects first hundred rows, returns a methylRaw object
subset1=methylRawList.obj[[1]][1:100] 

# selects first hundred rows, returns a methylBase object
subset2=methylBase.obj[1:100,] 

# selects first hundred rows, returns a methylDiff object
subset3=methylDiff.obj[1:100,] 

# This will get chromomsomes, will return a factor
# That means the resulting object will ceases to be a methylKit object
chrs=methylDiff.obj[[2]]


# }

Run the code above in your browser using DataLab