featureBlocks {Repitools} | R Documentation

## Make windows for distances around a reference point.

### Description

Windows are made around a reference point, which is the start coordinate for features on the + strand, and the end coordinate for features on the - strand. For unstranded features, the reference point is taken to be the mid-point of the feature.

### Usage

      ## S4 method for signature 'data.frame'
    featureBlocks(anno, ...)
      ## S4 method for signature 'GRanges'
    featureBlocks(anno, up = NULL, down = NULL, dist = c("base", "percent"),
                                        keep.strand = FALSE)

### Arguments

`anno` | A `data.frame` or `GRanges`, describing some genomic features.
`up` | The amount to go upstream or towards the start of a chromosome. Semantics depend on the value of `dist`. See details.
`down` | The amount to go downstream or towards the end of a chromosome. Semantics depend on the value of `dist`. See details.
`dist` | Whether `up` and `down` refer to bases, or a percentage of each feature's width.
`keep.strand` | Whether the blocks should keep the strands of their features, or if all blocks should have strand be `'*'`
`...` | Arguments from the list above that are not used directly within the `data.frame` method.

### Details

`up` refers to how many bases to go upstream for stranded features, or for unstranded features, how many bases to go towards the start of the chromosome, from the mid-point of the feature. Having a negative value for `up` means that the windows will start downstream by that amount, for stranded features. For unstranded features, it will start that many bases closer to the end of the chromosome, relative to the feature mid-point.

`down` is defined analogously.

### Value

A `GRanges` of windows surrounding reference points for the features described by `anno`.

### Author(s)

Dario Strbenac

### Examples

      genes <- data.frame(chr = c("chr1", "chr3", "chr7", "chr22"),
                       start = seq(1000, 4000, 1000),
                       end = seq(1500, 4500, 1000),
                       strand = c('+', '-', '-', '+'))

      featureBlocks(genes, 500, 500)

[Package Repitools version 1.34.0 Index]