select-methods: selects rows from of methylKit objects

Description Usage Arguments Value Examples

Description

The function returns a subset of data contained in the methylKit objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
select(x,i)

## S4 method for signature 'methylBase'
select(x, i)

## S4 method for signature 'methylRaw'
select(x, i)

## S4 method for signature 'methylDiff'
select(x, i)

## S4 method for signature 'methylRawDB'
select(x, i)

## S4 method for signature 'methylBaseDB'
select(x, i)

## S4 method for signature 'methylDiffDB'
select(x, i)

Arguments

x

an methylBase,methylBaseDB, methylRaw,methylRawDB or methylDiff object

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.

Value

a methylBase,methylRaw or methylDiff object depending on the input object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data(methylKit)


methylRawDB.obj=methRead( system.file("extdata","test1.txt.bgz",package="methylKit"),
                          sample.id="test1", assembly="hg18",
                          dbtype = "tabix",dbdir = "methylDB")

methylBaseDB.obj=unite(methylRawList.obj,save.db=TRUE,dbdir="methylDB")


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

# selects first hundred rows, returns a methylBase object
subset2=select(methylBase.obj,1:100) 
subset2=select(methylBaseDB.obj,1:100)

# selects first hundred rows, returns a methylDiff object
subset3=select(methylDiff.obj,1:100)




# remove Database again
rm(methylBaseDB.obj)
rm(methylRawDB.obj)
unlink("methylDB",recursive=TRUE)

methylKit documentation built on Jan. 30, 2021, 2 a.m.