extractBinding: Extract binding values for graphical representations

Description Usage Arguments Details Value Methods (by class) Author(s) See Also Examples

Description

Extracts and formats binding scores for each experiment into structures adapted to performing different graphical representations.

Usage

 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
extractBinding(theObject, gff_vec, genome, binsize = 50, before = 2000, 
               after=2000, mean_or_median = "mean", interpolation_number = 100,
               interpolation_average = 10000, ignore_strand = FALSE, 
               verbose = FALSE)
            
## S4 method for signature 'ChIPSeqSpikeDataset'
extractBinding(theObject, gff_vec, genome, 
                binsize = 50, before = 2000, after=2000, 
                mean_or_median = "mean", interpolation_number = 100, 
                interpolation_average = 10000, ignore_strand = FALSE, 
                verbose = FALSE)

## S4 method for signature 'ChIPSeqSpikeDatasetBoost'
extractBinding(theObject, gff_vec, genome,
                binsize = 50, before = 2000, after=2000, 
                mean_or_median = "mean", interpolation_number = 100, 
                interpolation_average = 10000, ignore_strand = FALSE, 
                verbose = FALSE)

## S4 method for signature 'ChIPSeqSpikeDatasetList'
extractBinding(theObject, gff_vec, genome, 
                binsize = 50, before = 2000, after=2000, 
                mean_or_median = "mean", interpolation_number = 100, 
                interpolation_average = 10000, ignore_strand = FALSE, 
                verbose = FALSE)

## S4 method for signature 'ChIPSeqSpikeDatasetListBoost'
extractBinding(theObject, gff_vec, 
                genome, binsize = 50, before = 2000, after=2000, 
                mean_or_median = "mean", interpolation_number = 100, 
                interpolation_average = 10000, ignore_strand = FALSE, 
                verbose = FALSE)

Arguments

theObject

ChIPSeqSpike dataset (see ?spikeDataset)

gff_vec

File in GFF format containing annotations used to plot information

genome

The UCSC code of reference genome, e.g. 'hg19' for Homo sapiens (see details)

binsize

Binning size used to create bigwig files. Default is 50.

before

Length in bp of the interval upstream annotation. Default is 2000.

after

Length in bp of the interval downstream annotation. Default is 2000.

mean_or_median

For average profiles, should the 'mean' or 'median' values be used. Default is 'mean'.

interpolation_number

Number of interpolated points to create matrices (see details). Default is 100.

interpolation_average

Number of interpolated points of profiles and heatmaps (see details). Default is 10000.

ignore_strand

If TRUE, the directionality is ignored, that is all features strands, regardless of annotation in GFF file, are treated as undetermined ("*"). Default is FALSE.

verbose

If TRUE, output processing messages. Default is FALSE.

Details

This method should be called before performing any graphical analysis. It updates two slots of theObject:

The SetArrayList contains values for 4 kind of representations (profiles and heatmaps): Representation at the start of the annotation (-before/ +after parameters); at the midpoint of the annotation; at the end of the annotation (-before/+after) or at the entire annotation (-before/+after). For representations using the entire annotations and upstream (before)/ downstream intervals, the number of points used for the within annotation interpolation is defined by the interpolation_average parameter.

For details on installing reference genomes, see details of the function 'getPlotSetArray' of the 'seqplots' package.

Value

Returns the same object with binding values in the form of plotSetArray and matrices (see details).

Methods (by class)

Author(s)

Nicolas Descostes

See Also

spikeDataset plotProfile plotTransform plotHeatmaps boxplotSpike plotCor getPlotSetArray

Examples

 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
35
36
## 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")
gff_vec <- system.file("extdata/test_coord.gff", package="ChIPSeqSpike")
genome_name <- "hg19"

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

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

    ## Extract binding values
    csds <- extractBinding(csds, gff_vec, genome_name)

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

ChIPSeqSpike documentation built on Nov. 8, 2020, 5:29 p.m.