signal_at_intergen: Signal at intergenic regions between convergent, divergent or...

Description Usage Arguments Value Examples

Description

This function allows you to pull out the ChIP signal over a window of positions of the selected size (defaulting to regionSize = 1000) centered on midpoints of intergenic regions between genes of the selected orientation: convergent, divergent or tandem. It takes as input either the wiggle data as list of 16 chromosome (output of readall_tab) or the complete genome in one data frame (for example loaded from .bed files).

Usage

1
2
3
signal_at_intergen(inputData, inputDataFrame = FALSE,
  orientation = c("conv", "div", "tandem"), regionSize = 1000,
  includeOverlapping = TRUE, saveFile = FALSE)

Arguments

inputData

As a list of the 16 chr wiggle data (output of readall_tab) or a data frame (in which case you must set inputDataFrame = TRUE). No default.

inputDataFrame

Boolean indicating whether input data is a data frame, as opposed to the standard wiggle data in a list of 16 chromosomes. Defaults to FALSE.

orientation

A string indicating the type of intergenic region to analyze, according to the orientation of the flanking genes. Accepts one of:

  1. conv Convergent genes

  2. div Divergent genes

  3. tandem Tandem genes. All regions in output will be in the same 5' -> 3' orientation (genes on Crick strand are reversed).

Abbreviated arguments (down to as short as the first letter only) are accepted. Defaults to conv.

regionSize

Number indicating the size (in bp) of the region to calculate. Defaults to 1000 bp (midpoint +/- 500 bp).

includeOverlapping

Boolean indicating whether intergenic regions between overlapping genes should be included in the analysis. If includeOverlapping = FALSE, intergenic regions between overlapping genes will not be included in the analysis. Otherwise all regions are included. Defaults to TRUE.

saveFile

Boolean indicating whether output should be written to a .txt file (in current working directory). If saveFile = FALSE, output is returned to screen or an R object (if assigned). Defaults to FALSE.

Value

A local data frame (dplyr data frame) with four columns:

  1. chr Chromosome number

  2. position Nucleotide coordinate (relative to midpoint of intergenic region)

  3. signal ChIP signal

  4. dist_apart Distance between the two genes (negative value for overlapping genes)

Examples

1
2
3
4
5
6
7
## Not run: 
signal_at_intergen(WT)

signal_at_intergen(WT, orientation = 'div', inputDataFrame = TRUE, regionSize = 1500,
                   includeOverlapping = FALSE, saveFile = TRUE)

## End(Not run)

luisvalesilva/hwglabr documentation built on May 21, 2019, 8:56 a.m.