Description Usage Arguments Details Value Methods (by class) Author(s) See Also Examples
Applies or reverse different type of scaling/normalization to bigwig files contained in 'ChIPSeqSpikeDataset', 'ChIPSeqSpikeDatasetBoost', 'ChIPSeqSpikeDatasetList' or 'ChIPSeqSpikeDatasetListBoost' objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | scaling(theObject, reverse = FALSE, type = "endo", verbose = TRUE,
outputFolder = NULL)
## S4 method for signature 'ChIPSeqSpikeDataset'
scaling(theObject, reverse = FALSE,
type = "endo", verbose = TRUE, outputFolder = NULL)
## S4 method for signature 'ChIPSeqSpikeDatasetBoost'
scaling(theObject, reverse = FALSE,
type = "endo", verbose = TRUE, outputFolder = NULL)
## S4 method for signature 'ChIPSeqSpikeDatasetList'
scaling(theObject, reverse = FALSE,
type = "endo", verbose = TRUE, outputFolder = NULL)
## S4 method for signature 'ChIPSeqSpikeDatasetListBoost'
scaling(theObject, reverse = FALSE,
type = "endo", verbose = TRUE, outputFolder = NULL)
|
theObject |
|
reverse |
If TRUE, reverse the scaling applied previously (see details). Default is FALSE |
type |
Should be 'endo' or 'exo' to apply the endogenous or exogenous scaling factor respectively. |
verbose |
If FALSE, do not output processing messages. Default is TRUE |
outputFolder |
Define the folder where scaled bigwig are output. Default is NULL (see details). |
Scaling is performed after estimating scaling factors with '?estimateScalingFactors'.
Different type of scaling can be performed according to the steps of spike-in normalization. The first type is to transform the data by performing a RPM scaling. The second type is to reverse the RPM scaling after having performed input subtraction with '?inputSubtraction'. The third and last type is to apply the exogenous scaling factor which finalizes the spike-in normalization (see example below for parameter settings).
To perform all steps in one call and in the right order, one can consider using the '?spikePipe' function.
If not in boost mode, the bigwig files are written to the folder containing the currently processed bigwig files. In boost mode, use the method ?exportBigWigs to output the transformed files.
If outputFolder is not NULL, the original bigwig files should be copied to this folder before performing the analysis. This parameter was created to test the package with the provided files in extdata/.
On Windows operating system, due to the Bioconductor package rtracklayer >= 1.37.6 not supporting bigWig files, this method is not available.
Return an object of the same class of the input object and output scaled bigwig files if not in boost mode (see ?ChIPSeqSpikeDatasetBoost).
'-RPM', 'reverse' or 'spiked' suffixes are added to the bigwig file name if performing RPM scaling, reversing RPM scaling or applying exogenous scaling factors respectively.
ChIPSeqSpikeDataset
: Method for signature theObject=
'ChIPSeqSpikeDataset'
ChIPSeqSpikeDatasetBoost
: Method for signature theObject=
'ChIPSeqSpikeDatasetBoost'
ChIPSeqSpikeDatasetList
: Method for signature theObject=
'ChIPSeqSpikeDatasetList'
ChIPSeqSpikeDatasetListBoost
: Method for signature theObject=
'ChIPSeqSpikeDatasetListBoost'
Nicolas Descostes
spikeDataset
ChIPSeqSpikeDatasetBoost
spikePipe
inputSubtraction
exportBigWigs
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 | ## Mock example on a restricted number of reads
info_file_csv <- system.file("extdata/info.csv", package="ChIPSeqSpike")
bam_path <- system.file(c("extdata/bam_files"), package="ChIPSeqSpike")
bigwig_path <- system.file(c("extdata/bigwig_files"), package="ChIPSeqSpike")
csds <- spikeDataset(infoFile = info_file_csv, bamPath = bam_path,
bigWigPath = bigwig_path)
## Copying test files to the current folder
originalBW_vec <- as.character(getBigWigFile(csds))
dir.create("./test_chipseqspike")
result <- file.copy(originalBW_vec, "test_chipseqspike")
csds <- estimateScalingFactors(csds)
if(.Platform$OS.type != 'windows') {
## Apply RPM scaling
csds <- scaling(csds, outputFolder = "test_chipseqspike")
## Apply input subtraction
csds <- inputSubtraction(csds)
## Reverse RPM scaling after input subtraction
csds <- scaling(csds, reverse = TRUE)
## Apply exogenous scaling factors
csds <- scaling(csds, type = "exo")
}
## Delete all files generated in this example
unlink("test_chipseqspike/", recursive = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.