bedtoolsr: Counting reads mapped to a specified region using bedtools

Description Usage Arguments Details Value Author(s) References Examples

Description

Given bam file or directories of bam files, counting reads mapped to genomic intervals specified by user.

Usage

1
   bedtoolsr(bam = NULL, bamdir = NULL, bed)

Arguments

bam

bam file, including absolute path of the file. This is usually the output of alignment programs like, bwa, bowtie, etc.

bamdir

Alternatively, you can also provide the path of a list of bam files to process all at once.

bed

beb files, which include genomic intervels you want to measure.

Details

This function is basically a wrapper for bedtools, which means you still need to have bedtools installed on your computer and saved in your system path.

Value

A list of two elements:

count

a vector or matrix of values that indicates the number of reads that mapped to user-specified intervals

gaplength

a integer vector that indicates the gap length of user-specified intervals

Author(s)

Yuanhang Liu

References

https://github.com/Liuy12/MBDDiff

Examples

1
2
3
4
5
## Not run: 
	# Process several bam files in a fold 
	Promoter_counts <- bedtoolsr(bamdir = '/path/to/bam/files', bed = '/path/to/bed/file')
	
## End(Not run)

Liuy12/MBDDiff documentation built on May 7, 2019, 2 p.m.