sumBAMinputs: Creates summed input track from multiple ChIP-seq input...

Description Usage Arguments Value Author(s) References Examples

Description

The function creates the BigWig formatted summed input from aligned input experiments in BAM format. The first two step of BEADS normalization, i.e. GC normalization and mappability correction are performed independently on all input experiments. Further, the obtain signals are summed. The tracks are normalized for tag count, so each experiment contribute in equally to summed input. It is important to select only good quality run for summed input preparation. FastQC is a good program for sequencing experiment quality assessment. It is important to create the summed input with the same parameters as will be used for future BEADS runs.

Usage

1
2
3
4
sumBAMinputs(bam.controls = dir(pattern = "bam$"), bw.mappability, genome,
  out_name = paste0("Summed_", length(bam.controls), "_experiments"),
  uniq = TRUE, insert = 200L, mapq_cutoff = 10L, quickMap = TRUE,
  bin = 25L)

Arguments

bam.controls

The character vector containing paths to control (input) alignment files in BAM format

bw.mappability

The path to mappability track in BigWiggle format (accepts BigWigFile cless as well)

genome

The path reffrence genome FASTA or UCSC identifier fo installed BSgenome packages e.g. "hg19" for human

out_name

The prefix for exported BigWiggle, full name out_name_SummedInput_linear_binbp.bw

uniq

If TRUE the alignemnt will be uniqued, i.e. only one of non-unique reads will be used

insert

The expected insert size in base pairs.

mapq_cutoff

The cutoff parameter used to filter BAM alignments for low mapping quality reads.

quickMap

If TRUE the quick mappability processing be used, otherwise the mappability track will be processed by running mean smoothing

bin

The desired binning window. 1L disables binning. It is recommended to set it >1L, as it greatly reduces the size of the output BW files and speeds up further BEADS runs.

Value

BigWigFile class containing connection to summed input BigWig file.

Author(s)

Przemyslaw Stempor

References

http://beads.sourceforge.net/
http://www.ncbi.nlm.nih.gov/pubmed/21646344

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Get the paths of example files
input_bam <- system.file("extdata", "Input_fE3_AA169.bam", package="rbeads")
map_bw <- system.file("extdata", "ce10_mappability_chrI_100Kb_sample.bw", package="rbeads")
ref_fa <- system.file("extdata", "ce10_chrI_100Kb_sample.fa", package="rbeads")

# Set the directory where the output files will be crated
setwd(tempdir())

# Calculate summed input; in this example we will pretend that we have 3 test input files,
# in real applications these should be different experiments
out1 <- sumBAMinputs(c(input_bam, input_bam, input_bam), map_bw, ref_fa)

# Sanity check: The mean signal ratio between previous example (using 3 identical inputs) 
# and single normalized input should be very close to 3 
# (limited by binning function and BigWig summary numerical precision) 
out2 <- sumBAMinputs(input_bam, map_bw, ref_fa)
rtracklayer::summary(out1)[[1]]$score / rtracklayer::summary(out2)[[1]]$score

Przemol/rbeads documentation built on May 8, 2019, 3:46 a.m.