inputSubtraction {ChIPSeqSpike} | R Documentation

## Substracts binding scores of input DNA to experiment binding scores

### Description

Substracts binding scores of input DNA to experiment binding scores. This step enables to remove artifactual signal.

### Usage

    inputSubtraction(theObject, verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDataset'
    inputSubtraction(theObject, verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDatasetBoost'
    inputSubtraction(theObject,
    verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDatasetList'
    inputSubtraction(theObject, verbose = TRUE)

    ## S4 method for signature 'ChIPSeqSpikeDatasetListBoost'
    inputSubtraction(theObject,
    verbose = TRUE)

### Arguments

`theObject` | `ChIPSeqSpike` dataset (see ?spikeDataset)
`verbose` | If FALSE, do not output processing messages. Default is TRUE

### Details

When immunoprecipitating (IP) DNA bound by a given protein, a control is needed to distinguish background noise from true signal. This is typically achieved by performing a mock IP omitting the use of antibody. After sequencing, one can notice peaks of signal above background. These peaks have to be removed from analysis since they represent false positives.

The inputSubtraction function reads bigwig files into GRanges objects that are used to perform the subtraction. In boost mode (ChIPSeqSpikeDatasetBoost and ChIPSeqSpikeDatasetListBoost), The reading/writing steps are omitted.

If not in boost mode, the input DNA subtracted 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.

On Windows operating system, due to the Bioconductor package rtracklayer >= 1.37.6 not supporting bigWig files, this method is not available.

### Value

Return an object of the same class of the input object with subtracted experiment scores.

A 'BGSub' suffix is added to the bigwig file name.

### Methods (by class)

- `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

`spikeDataset` `exportBigWigs` `spikePipe` `scaling`

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

    if(.Platform$OS.type != 'windows') {

        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)

        ## Apply RPM scaling
        csds <- scaling(csds, outputFolder = "test_chipseqspike")

        ## Apply input subtraction
        csds <- inputSubtraction(csds)

        ## Delete all files generated in this example
        unlink("test_chipseqspike/", recursive = TRUE)
    }

[Package ChIPSeqSpike version 1.6.0 Index]