HTCexp-class {HiTC} | R Documentation

## Class 'HTCexp'

### Description

A class for representing high throughput Chromosome Conformation Capture data from next-generation sequencing experiments.

### Details

The `normPerExpected` method estimates the expected interactions based on a the dependency on the genomic proximity between two loci. See `getExpectedCounts` function for details.

The `normPerTrans` method is based on the assumption that all trans contacts should be the same. Thus, the cis contacts can be normalized by the interaction level of trans data. The `xtrans` trans map has to share its 'xgi' ranges with the cis map, and the `ytrans` has to share its 'ygi' ranges with the cismap. The `method` is used to combine the normalization factor from x and y ranges. Must be ‘sum’, ‘mult’ or ‘mean’.

### Objects from the Class

Objects can be created either by:

1. calls of the form `new("HTCexp", intdata, GRanges, GRanges)`.

2. using the auxiliary function `HTCexp` and supplying contact Matrix with x and y intervals definition. The forceSymmetric option can used to force intra-chromosomal contact maps to be stored as symmetrical matrix.

### Slots

`intdata`:

  Dense or Sparse Matrix, holding the interaction level between each pairs of 'x-y' intervals. The 'y' intervals must be in rows, and the 'x' in columns.

`ygi`:

  Genomic ranges of y intervals; see class `granges` for details

`xgi`:

  Genomic ranges of x intervals; see class `granges` for details

### Methods

c(x, ...)

  Combines 'x' and the `signature("HTCexp")` objects in '...' together. The results is an object of class `signature("HTCList")`

detail(x)

  `signature("HTCexp")`: a more detailed output of the experiment than provided by `show`.

divide(x)

  comparison of two `signature("HTCexp")` objects. Perform the division of the two contact matrices on the common 'x' and 'y' intervals. The operation is done only on the common intervals of both objects. If one of the two objects has a count to zero, the divided value will be NA

intdata(x)

  return the `intdata` Matrix counts. Note that triangular matrices are always returned as symmetric matrices.

export(x)

  Defunct. See exportC method

isBinned

  return TRUE if the data are binned. The method tests if the 'x' and 'y' genome intervals are the same, if 90% of the bins have the same size and if the full genomic range is covered

forceSymmetric(x)

  force the interaction data to 'symmetricMatrix'

forceTriangular(x)

  force the interaction data to triangular, ie. symmetric. Lower triangle of the matrix is set to zero, therefore reducing the size of the data in memory

isIntraChrom(x)

  return TRUE if the current `signature("HTCexp")` object contains intrachromosomal contact data

isSymmetric(x)

  return TRUE if the contact map is symmetrical, i.e inherits the `symmetricMatrix` class

normPerReads(x)

  normalize the contact matrix by the total number of reads of the matrix.

normPerExpected(x, ...)

  normalize the contact matrix by the expected number of reads based on the distance between two loci. See details.

normPerZscore(x)

  Defunct. See normPerExpected method

normPerTrans(x, xtrans, ytrans, method="sum")

  Normalize cis contact map based on the trans interactions. See details

plot(x)

  visualization method; Display an heatmap of the contact data. Refer to the documentation of `mapC` for more details of the plotting function

range(x)

  return the genomic range of the `signature("HTCexp")` object

seq_name(x)

  Defunct. See seqlevels method

seqlevels(x)

  return the sequence levels of the `signature("HTCexp")` object

show(x)

  summarized output of the experiment, with informations about the data dimension and the genomic region studied

substract(x)

  comparison of two `signature("HTCexp")` objects. Perform the substraction of the two contact matrices on the common 'x' and 'y' intervals. The operation is done only on the common intervals of both objects. If one of the two objects has a count to zero, the divided value will be NA

summary(x)

  return descriptive summary statistics about the contact map

x_intervals(x)

  return the `xgi` GRanges object defining the x intervals

y_intervals(x)

  return the `ygi` GRanges object defining the y intervals

xy_intervals(x)

  return both `xgi` and `ygi` objects as a `GRangesList` object

### Author(s)

Nicolas Servant

### See Also

`GRanges-class`,`GRangesList-class`,`Matrix-class`

### Examples

    data(Nora_5C)

    ## HTCexp descriptio
    show(E14)
    detail(E14)

    ## Is binned data ?
    isBinned(E14$chrXchrX)

    ## Is a inter or intrachromsomal experiment ?
    isIntraChrom(E14$chrXchrX)

    ## Bin the data
    E14.bin <- binningC(E14$chrXchrX, binsize=100000, step=3)

    ## Divide by expected interaction counts
    E14norm<-normPerExpected(E14.bin)

    ## Operation on HTCexp object
    E14_d_MEF<-divide(normPerReads(E14$chrXchrX), normPerReads(MEF$chrXchrX))
    E14_s_MEF<-substract(normPerReads(E14$chrXchrX), normPerReads(MEF$chrXchrX))

    ## Overlap with genomic annotation
    require(rtracklayer)
    gene <- import(file.path(system.file("extdata", package="HiTC"),"refseq_mm9_chrX_98831149_103425150.bed"), format="bed")
    plot(E14$chrXchrX, tracks=list(RefSeqGene=gene))

    ## Not run:
    ## normPerTrans data normalization applied on \href{http://genome.ucsc.edu/cgi-bin/hgFileUi?db=hg19&g=wgEncodeUmassDekker5C}{ENCODE data}.
    ENCODE=import.my5C("./ENM-GM12878-R1.matrix")

    ## Look at raw contact map
    mapC(ENCODE$chr7chr7)

    ## look at normalize by trans contact map
    mapC(normPerTrans(ENCODE$chr7chr7, xtrans=ENCODE$chr7chr5, ytrans=ENCODE$chr5chr7))

    ## End(Not run)

    ## Not run:
    ## Export
    exportC(E14$chrXchrX, con="E14.csv")

    ## End(Not run)

[Package HiTC version 1.31.0 Index]