getCompartments {compartmap} | R Documentation

## Estimate A/B compartments

### Description

`getCompartments` returns estimated A/B compartments from ATAC-seq and methylation array data

### Usage

    getCompartments(obj, type = c("atac", "array"), res = 1e+06,
      parallel = FALSE, chrs = "chr1", genome = "hg19", targets = NULL,
      run_examples = FALSE, ...)

### Arguments

`obj` | The object with which to perform compartment inference
`type` | The type of data that obj represents (e.g. atac or array)
`res` | Resolution of compartments in base pairs (default is 1e6)
`parallel` | Should the estimates be done in parallel (default is FALSE)
`chrs` | Chromosomes to operate on (can be individual chromosomes, a list of chromosomes, or all)
`genome` | Genome to use (default is hg19)
`targets` | Specify samples to use as shrinkage targets
`run_examples` | Whether to run ATAC-seq and 450k example analysis
`...` | Other parameters to pass to internal functions

### Details

This is a wrapper function to perform A/B compartment inference. Compartmentalizer implements a Stein estimator to shrink per-sample compartment estimates towards a global mean. The expected input for this function can be generated using packages like SeSAMe and ATACseeker.

### Value

A p x n matrix (samples as columns and compartments as rows) to pass to embed_compartments

### Examples

    library(GenomicRanges)
    library(SummarizedExperiment)
    library(Homo.sapiens)

    #ATAC-seq data
    data(bulkATAC_raw_filtered_chr14, package = "compartmap")
    atac_compartments <- getCompartments(filtered.data.chr14, type = "atac", parallel = FALSE, chrs = "chr14")
    ## Not run:
    #450k data
    data(meth_array_450k_chr14, package = "compartmap")
    array_compartments <- getCompartments(array.data.chr14, type = "array", parallel = FALSE, chrs = "chr14")
    ## End(Not run)

[Package compartmap version 1.6.0 Index]