Learn R Programming

chicane (version 0.1.8)

combine.replicates: combine.replicates

Description

Merge biological replicates.

Usage

combine.replicates(replicates, method = c("sum", "weighted-sum"))

Arguments

replicates

list of data table objects from prepare.data

method

string specifying the method for merging replicates. Options are 'sum' and 'weighted-sum'.

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

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.

References

Anders, Simon, and Wolfgang Huber. "Differential expression analysis for sequence count data." Genome biology 11.10 (2010): R106.

Examples

Run this code
# NOT RUN {
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));
 }
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab