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).
signal_at_intergen(inputData, inputDataFrame = FALSE, orientation = c("conv", "div", "tandem"), regionSize = 1000, includeOverlapping = TRUE, saveFile = FALSE)
inputData | As a list of the 16 chr wiggle data (output of |
---|---|
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 |
orientation | A string indicating the type of intergenic region to analyze, according to the orientation of the flanking genes. Accepts one of:
Abbreviated arguments (down to as short as the first letter only) are accepted.
Defaults to |
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 |
saveFile | Boolean indicating whether output should be written to a .txt file (in current working
directory). If |
A local data frame (dplyr data frame) with four columns:
chr
Chromosome number
position
Nucleotide coordinate (relative to midpoint of intergenic region)
signal
ChIP signal
dist_apart
Distance between the two genes (negative value for overlapping genes)
# NOT RUN { signal_at_intergen(WT) signal_at_intergen(WT, orientation = 'div', inputDataFrame = TRUE, regionSize = 1500, includeOverlapping = FALSE, saveFile = TRUE) # }