getRegion {Genominator} | R Documentation

## Select a region from an ExpData object.

### Description

This function selects a subset of the data that falls into a particular contiguous genomic region.

### Usage

    getRegion(expData, chr, start, end, strand, what = "*",
      whereClause = "", verbose = getOption("verbose"))

### Arguments

`expData` | An object of class `ExpData`.
`chr` | Chromosome number of desired region.
`start` | Start position of desired region. If omitted, it is set to 0.
`end` | End position of desired region. If omitted, it is set to 1e12.
`strand` | Strand of desired region. Values of 1 or -1 return data from forward or reverse strand. A value of 0 or a missing argument returns data from any strand, including data with missing strand information.
`what` | A vector of column names specifying which columns of the data should be returned. Defaults to all columns.
`whereClause` | Additional filtration criteria, customizable to refer to additional data columns. See Details for more explanation.
`verbose` | Logical indicating whether details should be printed.

### Details

The argument `whereClause` should be a string indicating a subset of the data to be selected, using SQL syntax. For example, if you have a column called `category`, you could specify `category = 1` to select only those data entries where category has a value of 1. This function operates as a database query, and this argument can include logical combinations of multiple criteria.

### Value

Returns a data frame containing the data from the desired region, with the desired columns.

### Author(s)

James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu

### See Also

See `Genominator` vignette for more information.

### Examples

    ed <- ExpData(system.file(package = "Genominator", "sample.db"),
                  tablename = "raw")
    c1 <- getRegion(ed, chr = 1)
    dim(c1)
    head(c1)

[Package Genominator version 1.40.0 Index]