Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/dataSmoothing.R
This function allows to obtain a smoothed signal of the genome-wide read depth. Simple moving average (SMA) procedure is used. At each genomic position, the sequencing coverage is replaced by the unweighted mean of the n surrounding positions (n/2 before and n/2 after).
1 | dataSmoothing(vecData, widthValue = 20)
|
vecData |
A vector with the numbers of sequences aligned at each genomic position to be considered in the analysis |
widthValue |
The number (n/2) of surrounding positions to use for mean calculation |
Detailed information and tutorials can be found online http://bpeaks.gene-networks.net/
.
A vector with the smoothed signal. Note that the SMA procedure creates missing values at the beginning and at the end of the vector with the smoothed signal.
Detailed information and tutorials can be found online http://bpeaks.gene-networks.net/
.
Gaelle LELANDAIS
http://bpeaks.gene-networks.net/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # get data
data(dataPDR1)
# inital IP signal
iniIPsignal = dataPDR1$IPdata[,3]
par(mfrow = c(2,2))
# plot initial IP signal
plot(iniIPsignal[416900:417400], type = "h",
xlab = "genomic position", ylab = "sequencing coverage",
main = "IP sample (PDR1 data)\nno smoothing",
col = "red")
# calculate and plot smoothed signal (widthValue = 5)
smoothedIPsignal = dataSmoothing(vecData = iniIPsignal, widthValue = 5)
plot(smoothedIPsignal[416900:417400], type = "h",
xlab = "genomic position", ylab = "sequencing coverage",
main = "IP sample (PDR1 data)\nsmoothing (widthValue = 5)",
col = "pink")
# calculate and plot smoothed signal (widthValue = 10)
smoothedIPsignal = dataSmoothing(vecData = iniIPsignal, widthValue = 10)
plot(smoothedIPsignal[416900:417400], type = "h",
xlab = "genomic position", ylab = "sequencing coverage",
main = "IP sample (PDR1 data)\nsmoothing (widthValue = 10)",
col = "pink")
# calculate and plot smoothed signal (widthValue = 20)
smoothedIPsignal = dataSmoothing(vecData = iniIPsignal, widthValue = 20)
plot(smoothedIPsignal[416900:417400], type = "h",
xlab = "genomic position", ylab = "sequencing coverage",
main = "IP sample (PDR1 data)\nsmoothing (widthValue = 20)",
col = "pink")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.