Last data update: 2014.03.03

R: Function converts bam file to bedgraph by counting number of...
bam2bedgraphR Documentation

Function converts bam file to bedgraph by counting number of reads starting at each position (termination counts) It creates two-track bedgraph file (one track for each strand).

Description

#'

Usage

bam2bedgraph(bam_path, allowed_flags = 0:4095, maxMemory = 8000,
  genome_build, bedgraph_out_file = "out_file", track_name = "Track_name",
  track_description = "Track_description")

Arguments

bam_path

path to a bam file to be converted

allowed_flags

integer vector with SAM flags should be kept, see https://broadinstitute.github.io/picard/explain-flags.html for explanation

maxMemory

maxMemory of scanBam function used internally

genome_build

character specifying which UCSC genome build should data be displayed in, e.g. "mm9"

bedgraph_out_file

character specifying prefix of output file. Generated file name is: prefix.bedgraph; if file with such a name already exists new tracks will be appended.

track_name

character specifying track name

track_description

character specifying track description

Author(s)

Lukasz Jan Kielpinski

Results