combine.replicates {chicane} | R Documentation |
combine.replicates
Description
Merge biological replicates.
Usage
combine.replicates(replicates, method = c("sum", "weighted-sum"))
Arguments
replicates |
list of data table objects from |
method |
string specifying the method for merging replicates. Options are 'sum' and 'weighted-sum'. |
Details
The parameter method
determines which method is used for merging
replicates. Available options are weighted-sum and sum.
'weighted-sum' implements the size factor scaling approach used in DEseq, rounded to the closest integer. See Anders and Huber 2010 for details.
'sum' is the naive sum of counts across biological replicates.
Value
Data table object containing merged data, where counts are stored in colums
count.i |
count of interaction in ith replicate |
count |
count after merging replicates |
References
Anders, Simon, and Wolfgang Huber. "Differential expression analysis for sequence count data." Genome biology 11.10 (2010): R106.
Examples
if( bedtools.installed() ) {
# preprocess data
bam <- system.file('extdata', 'Bre80_2q35.bam', package = 'chicane');
baits <- system.file('extdata', '2q35.bed', package = 'chicane');
fragments <- system.file('extdata', 'GRCh38_HindIII_chr2.bed.gz', package = 'chicane');
input.data <- prepare.data(
bam = bam,
baits = baits,
fragments = fragments
);
# combined two datasets into one
merged <- combine.replicates(list(input.data, input.data));
}