readBamFile: Read bam file

Description Usage Arguments Value Examples

View source: R/GlobalFunctions.R

Description

Reading bam file format

readBamFile

Usage

1
readBamFile(filename)

Arguments

filename,

name/path of the bam file to be read (without extension)

Value

result list of lists, every list corresponds to a chromosome and contains a vector of coordinates of the 5' ends of the aligned tags.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## To run this example code the user MUST provide a bam file: The user can 
## download a ChIP-seq bam file for example from ENCODE:
## https://www.encodeproject.org/files/ENCFF000BFX/
## and save it in the working directory 

bamID="ENCFF000BFX"
## Not run: 
filepath=tempdir()
setwd(filepath)
system("wget 
https://www.encodeproject.org/files/ENCFF000BFX/@download/ENCFF000BFX.bam")

bamName=file.path(filepath,bamID)
chipBam=readBamFile(bamName)

## End(Not run)

ChIC documentation built on Nov. 8, 2020, 5:15 p.m.