Learn R Programming

RNAprobR (version 1.4.0)

bam2bedgraph: 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