estimateScalingFactors {ChIPSeqSpike} | R Documentation

## Compute scaling factors to perform spike-in normalization

### Description

Compute scaling factors for endogenous and exogenous experiment from 'Experiment', 'ExperimentLoaded', 'ChIPSeqSpikeDataset', 'ChIPSeqSpikeDatasetBoost', 'ChIPSeqSpikeDatasetList', and 'ChIPSeqSpikeDatasetListBoost'

### Usage

    estimateScalingFactors(theObject, paired = FALSE, verbose = TRUE)

    ## S4 method for signature 'Experiment'
    estimateScalingFactors(theObject, paired = FALSE,
    verbose = TRUE)

    ## S4 method for signature 'ExperimentLoaded'
    estimateScalingFactors(theObject, paired = FALSE,
    verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDataset'
    estimateScalingFactors(theObject,
    paired = FALSE, verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDatasetBoost'
    estimateScalingFactors(theObject,
    paired = FALSE, verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDatasetList'
    estimateScalingFactors(theObject,
    paired = FALSE, verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDatasetListBoost'
    estimateScalingFactors(theObject,
    paired = FALSE, verbose = TRUE)

### Arguments

`theObject` | `ChIPSeqSpike` dataset (see ?spikeDataset)
`paired` | Indicate if sequences are single- or paired-ended. Default is FALSE
`verbose` | If False, do not output processing messages. Default is TRUE

### Details

Estimating scaling factors is the first step to perform on a dataset. A scaling factor is defined as:

- 1/(bam_count/1000000)

bam_count being the number of reads aligned to the genome. The count is determined for the endogenous and exogenous experiments.

Scaling factors will the be applied to the bigwig files in the following steps of the procedure. After estimating scaling factors, RPM normalization should be performed.

### Value

Return an object of the same class of the input object containing computed scaling factors.

### Methods (by class)

- `Experiment`: Method for signature theObject='Experiment'

- `ExperimentLoaded`: Method for signature theObject='ExperimentLoaded '

- `ChIPSeqSpikeDataset`: Method for signature theObject= 'ChIPSeqSpikeDataset'

- `ChIPSeqSpikeDatasetBoost`: Method for signature theObject= 'ChIPSeqSpikeDatasetBoost'

- `ChIPSeqSpikeDatasetList`: Method for signature theObject= 'ChIPSeqSpikeDatasetList'

- `ChIPSeqSpikeDatasetListBoost`: Method for signature theObject= 'ChIPSeqSpikeDatasetListBoost'

### Author(s)

Nicolas Descostes

### See Also

`spikeSummary` `scaling` `spikePipe`

### Examples

    ## 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)

    csds <- estimateScalingFactors(csds)

[Package ChIPSeqSpike version 1.2.1 Index]