Last data update: 2014.03.03

R: Class "GEcollection"
GEcollection-classR Documentation

Class "GEcollection"

Description

This class is used in the methylPipe library to define and manipulate a set of genomic regions and the associated DNA methylation patterns

Objects from the Class

This class is an extension of the RangedSummarizedExperiment class from the SummarizedExperiment package. Objects can be created using the function profileDNAmetBin which determines the absolute and relative methylation level by filling the binC, binmC and binrC slots. The assays slot of the RangedSummarizedExperiment class here consists of four matrices:

  • binC: each genomic region is divided in one or more bins and for each bin the density (per bp) of potential methylation sites is determined.

  • binmC: each genomic region is divided in one or more bins and for each bin the density (per bp) of methylation events is determined.

  • binrC: each genomic region is divided in one or more bins and for each bin the relative mC/C content is determined.

  • binscore: each genomic region is divided in one or more bins and scores can be assigned to them. In particular, it can be convenient for storing reads count for each bin of each genomic region.

The minimal set of data to create a GEcollection object is a set of genomic regions to be provided as a GRanges object and a dataset of class BSdata.

Methods

chr

signature(object = "GEcollection"): extracts the chr assignment of the genomic regions

Strand

signature(object = "GEcollection"): extracts the strand assignment of the genomic regions

binC

signature(object = "GEcollection"): extracts the binC matrix

binmC

signature(object = "GEcollection"): extracts the binmC matrix

binrC

signature(object = "GEcollection"): extracts the binrC matrix

binscore

signature(object = "GEcollection"): extracts the binscore matrix

binscore<-

signature(object = "GEcollection"): replaces the binscore matrix

nbins

signature(object = "GEcollection"): returns the number of bins

Author(s)

Kamal Kishore

Examples

require(BSgenome.Hsapiens.UCSC.hg18)
uncov_GR <- GRanges(Rle('chr20'), IRanges(c(14350,69251,84185), c(18349,73250,88184)))
H1data <- system.file('extdata', 'H1_chr20_CG_10k_tabix_out.txt.gz', package='methylPipe')
H1.db <- BSdata(file=H1data, uncov=uncov_GR, org=Hsapiens)
gr_file <- system.file('extdata', 'GR_chr20.Rdata', package='methylPipe')
load(gr_file)
gec.H1 <- profileDNAmetBin(GenoRanges=GR_chr20, Sample=H1.db, mcCLASS='mCG')
gec.H1

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(methylPipe)
Loading required package: GenomicRanges
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: Rsamtools
Loading required package: Biostrings
Loading required package: XVector
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/methylPipe/GEcollection-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GEcollection-class
> ### Title: Class "GEcollection"
> ### Aliases: GEcollection-class GEcollection show,GEcollection-method
> ###   chr,GEcollection-method binC,GEcollection-method
> ###   binmC,GEcollection-method binrC,GEcollection-method
> ###   nbins,GEcollection-method length,GEcollection-method
> ###   binscore,GEcollection-method binscore<-,GEcollection-method chr binC
> ###   binmC binrC nbins binscore length binscore<-
> ### Keywords: classes
> 
> ### ** Examples
> 
> require(BSgenome.Hsapiens.UCSC.hg18)
Loading required package: BSgenome.Hsapiens.UCSC.hg18
Loading required package: BSgenome
Loading required package: rtracklayer
> uncov_GR <- GRanges(Rle('chr20'), IRanges(c(14350,69251,84185), c(18349,73250,88184)))
> H1data <- system.file('extdata', 'H1_chr20_CG_10k_tabix_out.txt.gz', package='methylPipe')
> H1.db <- BSdata(file=H1data, uncov=uncov_GR, org=Hsapiens)
> gr_file <- system.file('extdata', 'GR_chr20.Rdata', package='methylPipe')
> load(gr_file)
> gec.H1 <- profileDNAmetBin(GenoRanges=GR_chr20, Sample=H1.db, mcCLASS='mCG')
> gec.H1
S4 Object of class GEcollection; 
GRanges object with 14 ranges and 0 metadata columns:
       seqnames           ranges strand
          <Rle>        <IRanges>  <Rle>
   [1]    chr20 [ 14350,  18349]      *
   [2]    chr20 [ 69251,  73250]      *
   [3]    chr20 [ 84185,  88184]      *
   [4]    chr20 [116264, 120263]      *
   [5]    chr20 [153924, 157923]      *
   ...      ...              ...    ...
  [10]    chr20 [273369, 277368]      *
  [11]    chr20 [307307, 311306]      *
  [12]    chr20 [334708, 338707]      *
  [13]    chr20 [389187, 393186]      *
  [14]    chr20 [470482, 474481]      *
  -------
  seqinfo: 1 sequence from an unspecified genome; no seqlengths

binmC : ok
binC : ok
binrC : ok
binscore : NA
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>