readBamFile: Read bam file

Description Usage Arguments Value Examples

View source: R/readBamFile.R

Description

Reading bam file format

readBamFile

Usage

1
readBamFile(filename, readAlignerType = "bam")

Arguments

filename,

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

readAlignerType,

format of the input file. Currently only 'bam' (default) and 'tagAlign' are supported

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)

carmencita/CHIC documentation built on May 2, 2021, 5:09 p.m.