View source: R/signal_at_orf.R
signal_at_orf | R Documentation |
This function allows you to pull out the ChIP signal over all ORFs in the genome. It collects the
signal over each ORF plus both flanking regions (1/2 the length of the ORF on each side) and
scales them all to the same value (1000). This means that for two example genes with lengths of
500 bp and 2 kb, flanking regions of 250 bp and 1 kb, respectively, will be collected up and
downstream. The whole region is then rescaled to a length of 1000, corresponding to a gene length
of 500 plus 250 for each flanking region. After scaling, a loess model of the signal is built and
used to output predictions of the signal at each position between 1 and 1000.
The function takes as input the wiggle data as a list of 16 chromosomes.
(output of readall_tab
).
Note: Our wiggle data always contains gaps with missing chromosome coordinates
and ChIP-seq signal. The way this function deals with that is by skipping affected genes.
The number of skipped genes in each chromosome is printed to the console, as well as the
final count (and percentage) of skipped genes.
signal_at_orf(inputData, gff, gffFile, loessSpan = 0.05, saveFile = FALSE)
inputData |
As a list of the 16 chr wiggle data (output of |
gff |
Optional dataframe of the gff providing the ORF cordinates. Must be provided if
|
gffFile |
Optional string indicating path to the gff file providing the ORF cordinates.
Must be provided if |
loessSpan |
Number specifying |
saveFile |
Boolean indicating whether output should be written to a .txt file (in current
working directory). If |
A local data frame with four columns:
chr
Chromosome number
position
Nucleotide coordinate (in normalized total length of 1 kb)
signal
ChIP-seq signal at each position (1 to 1000)
gene
Systematic gene name
## Not run:
signal_at_orf(WT, gff = gff)
signal_at_orf(WT, gffFile = S288C_annotation_modified.gff,
loessSpan = 0.1, saveFile = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.