spikeDataset: spikeDataset constructors function

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

View source: R/constructors.R

Description

Function for calling the correct constructor using csv or txt input file

Usage

1
2
  spikeDataset(infoFile, bamPath, bigWigPath, boost = FALSE, 
        verbose = TRUE)

Arguments

infoFile

csv or txt file containing information about files (see details).

bamPath

Path to the folder containing bam files.

bigWigPath

Path to the folder containing bigwig files.

boost

If TRUE, the object created enables to perform the analysis in boost mode (see details). Default is FALSE.

verbose

If FALSE, do not print messages about object creation. Default is TRUE

Details

'infoFile' should be a csv or a tab separated txt file. The column names should be: expName, endogenousBam, exogenousBam, inputBam, bigWigEndogenous and bigWigInput. These columns indicate the experiment names; the bam file names of data aligned to the reference genome; the bam file names of data aligned to the exogenous genome; the input DNA bam file names corresponding to each experiment; the bigwig file names of data aligned to the reference genome and the bigwig file names of input DNA experiments.

If 'infoFile' contains only one input file (specified for each experiment), a ChIPSeqSpikeDataset (or ChIPSeqSpikeDatasetBoost) object is created. if 'infoFile' contains different input DNA files, an object of type 'list' is created (ChIPSeqSpikeDatasetList or ChIPSeqSpikeDatasetListBoost). Each element of the list will contain all experiments corresponding to a given input DNA one.

If boost = TRUE, either a ChIPSeqSpikeDatasetBoost or ChIPSeqSpikeDatasetListBoost object is created. The boost mode enables to store the binding values in the form of a GRanges object and avoid reading/writing files at each processing step. Even if faster, this mode however consumes much more memory and should be used with caution.

Value

A ChIPSeqSpikeDataset object if only one input DNA experiment is provided.

A ChIPSeqSpikeDatasetBoost object if only one input DNA experiment is provided and boost = TRUE.

A ChIPSeqSpikeDatasetList object if several input DNA experiments are provided.

A ChIPSeqSpikeDatasetListBoost object if several input DNA experiments are provided and boost = TRUE.

Author(s)

Nicolas Descostes

See Also

ChIPSeqSpikeDataset ChIPSeqSpikeDatasetBoost ChIPSeqSpikeDatasetList ChIPSeqSpikeDatasetListBoost spikePipe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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")

## Returns ChIPSeqSpikeDatasetList
csds <- spikeDataset(infoFile = info_file_csv, bamPath = bam_path, 
                     bigWigPath = bigwig_path)
is(csds)
csds

## Returns ChIPSeqSpikeDatasetListBoost

if(.Platform$OS.type != 'windows') {
    csds <- spikeDataset(infoFile = info_file_csv, bamPath = bam_path, 
                         bigWigPath = bigwig_path, boost = TRUE)
    is(csds)
    csds
}

descostesn/ChIPSeqSpike documentation built on Aug. 6, 2019, 3:51 p.m.