dba {DiffBind} | R Documentation |
Constructs a new DBA object from a sample sheet, or based on an existing DBA object
dba(DBA,mask, minOverlap=2, sampleSheet="dba_samples.csv", config=data.frame(RunParallel=TRUE, reportInit="DBA", DataType=DBA_DATA_GRANGES, AnalysisMethod=DBA_DESEQ2, minQCth=15, fragmentSize=125, bCorPlot=FALSE, th=0.05, bUsePval=FALSE), peakCaller="raw", peakFormat, scoreCol, bLowerScoreBetter, filter, skipLines=0, bAddCallerConsensus=FALSE, bRemoveM=TRUE, bRemoveRandom=TRUE, bSummarizedExperiment=FALSE, bCorPlot, attributes)
DBA |
existing DBA object – if present, will return a fully-constructed DBA object based on the passed one, using criteria specified in the mask and/or minOverlap parameters. If missing, will create a new DBA object based on the sampleSheet. |
mask |
logical or numerical vector indicating which peaksets to include in the resulting model if basing DBA object on an existing one. See |
minOverlap |
only include peaks in at least this many peaksets in the main binding matrix if basing DBA object on an existing one. If minOverlap is between zero and one, peak will be included from at least this proportion of peaksets. |
sampleSheet |
data frame containing sample sheet, or file name of sample sheet to load (ignored if DBA is specified). Columns names in sample sheet may include:
For sample sheets loaded from a file, the accepted formats are comma-separated values (column headers, followed by one line per sample), or Excel-formatted spreadsheets ( |
config |
data frame containing configuration options, or file name of config file to load when constructing a new DBA object from a sample sheet. NULL indicates no config file. Relevant fields include:
|
peakCaller |
if a sampleSheet is specified, the default peak caller that will be used if the |
peakFormat |
if a sampleSheet is specified, the default peak file format that will be used if the |
scoreCol |
if a sampleSheet is specified, the default column in the peak files that will be used for scoring if the |
bLowerScoreBetter |
if a sampleSheet is specified, the sort order for peak scores if the |
filter |
if a sampleSheet is specified, a filter value if the |
skipLines |
if a sampleSheet is specified, the number of lines (ie header lines) at the beginning of each peak file to skip. |
bAddCallerConsensus |
add a consensus peakset for each sample with more than one peakset (i.e. different peak callers) when constructing a new DBA object from a sample sheet. |
bRemoveM |
logical indicating whether to remove peaks on chrM (mitochondria) when constructing a new DBA object from a sample sheet. |
bRemoveRandom |
logical indicating whether to remove peaks on chrN_random when constructing a new DBA object from a sample sheet. |
bSummarizedExperiment |
logical indicating whether to return resulting object as a |
bCorPlot |
logical indicating that a correlation heatmap should be plotted before returning. If |
attributes |
vector of attributes to use subsequently as defaults when generating labels in plotting functions:
|
MODE: Construct a new DBA object from a samplesheet:
dba(sampleSheet, config, bAddCallerConsensus, bRemoveM, bRemoveRandom, attributes)
MODE: Construct a DBA object based on an existing one:
dba(DBA, mask, attributes)
MODE: Convert a DBA object to a SummarizedExperiment object:
dba(DBA, bSummarizedExperiment=TRUE)
DBA object
Rory Stark and Gordon Brown
# Create DBA object from a samplesheet ## Not run: setwd(system.file("extra", package="DiffBind")) tamoxifen <- dba(sampleSheet="tamoxifen.csv") tamoxifen tamoxifen <- dba(sampleSheet="tamoxifen_allfields.csv") tamoxifen tamoxifen <- dba(sampleSheet="tamoxifen_allfields.csv",config="config.csv") tamoxifen ## End(Not run) #Create a DBA object with a subset of samples data(tamoxifen_peaks) Responsive <- dba(tamoxifen,tamoxifen$masks$Responsive) Responsive # change peak caller but leave peak format the same setwd(system.file("extra", package="DiffBind")) tamoxifen <- dba(sampleSheet="tamoxifen.csv", peakCaller="macs", peakFormat="raw", scoreCol=5 ) dba.show(tamoxifen, attributes=c(DBA_TISSUE,DBA_CONDITION,DBA_REPLICATE,DBA_CALLER)) # Convert DBA object to SummarizedExperiment data(tamoxifen_counts) sset <- dba(tamoxifen,bSummarizedExperiment=TRUE) sset