combine.replicates: combine.replicates

Description Usage Arguments Details Value References Examples

View source: R/combine.replicates.R

Description

Merge biological replicates.

Usage

1
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'.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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));
 }

chicane documentation built on Nov. 7, 2021, 1:07 a.m.