count {ChIPSeqSpike} | R Documentation

## Set the number of reads associated to an experiment

### Description

Set the number of endogenous reads associated to an experiment. This is used to compute scaling factors.

### Usage

    count(theObject) <- value

    ## S4 replacement method for signature 'ChIPSeqSpikeDataset'
    count(theObject) <- value

    ## S4 replacement method for signature 'ChIPSeqSpikeDatasetBoost'
    count(theObject) <- value

    ## S4 replacement method for signature 'Experiment'
    count(theObject) <- value

    ## S4 replacement method for signature 'ExperimentLoaded'
    count(theObject) <- value

    ## S4 replacement method for signature 'ChIPSeqSpikeCore'
    count(theObject) <- value

### Arguments

`theObject` | A `ChIPSeqSpikeDataset`, `ChIPSeqSpikeDatasetBoost`, `Experiment`, `ExperimentLoaded` or `ChIPSeqSpikeCore` object
`value` | A numeric representing the number of mapped reads

### Details

If the object is ChIPSeqSpikeCore, ChIPSeqSpikeDataset or ChIPSeqSpikeDatasetBoost, count will set the number of input DNA mapped reads to the endogenous reference genome.

If the object is Experiment or ExperimentLoaded, count will set the number of experiment mapped reads to the endogenous reference genome.

### Value

The modified object is returned

### Author(s)

Nicolas Descostes

### See Also

`exoCount` `estimateScalingFactors`

### Examples

    info_file_csv <- system.file("extdata/info.csv", package="ChIPSeqSpike")
    bam_path <- system.file("extdata/bam_files", package="ChIPSeqSpike")
    bigwig_path <- system.file("extdata/bigwig_files", package="ChIPSeqSpike")
    gff_vec <- system.file("extdata/test_coord.gff", package="ChIPSeqSpike")
    genome_name <- "hg19"
    output_folder <- "test_chipseqspike"
    bigwig_files <- system.file("extdata/bigwig_files",
                                c("H3K79me2_0-filtered.bw",
                                  "H3K79me2_100-filtered.bw",
                                  "H3K79me2_50-filtered.bw",
                                  "input_0-filtered.bw",
                                  "input_100-filtered.bw",
                                  "input_50-filtered.bw"), package="ChIPSeqSpike")

    if(.Platform$OS.type != 'windows') {
        ## Copying example files
        dir.create("./test_chipseqspike")
        result <- file.copy(bigwig_files, "test_chipseqspike")

        csds <- spikePipe(info_file_csv, bam_path, bigwig_path, gff_vec,
        genome_name, verbose = TRUE, outputFolder = output_folder)
        getCount(csds[[1]][[1]])
        count(csds[[1]][[1]]) <- 10
        getCount(csds[[1]][[1]])
        unlink("test_chipseqspike/", recursive = TRUE)
    }

[Package ChIPSeqSpike version 1.10.0 Index]