readBam {ORFik}R Documentation

Custom bam reader

Description

Only for single end reads Safer version that handles the most important error done. In the future will use a faster .bam loader for big .bam files in R.

Usage

readBam(path, chrStyle = NULL)

Arguments

path

a character path to .bam file

chrStyle

a GRanges object, or a seqlevelsStyle (Default: NULL) to get seqlevelsStyle from. Is chromosome 1 called chr1 or 1, is mitocondrial chromosome called MT or chrM etc. Will use 1st seqlevel-style if more are present. Like: c("NCBI", "UCSC") -> pick "NCBI"

Value

a GAlignments object of bam file

See Also

Other utils: bedToGR(), convertToOneBasedRanges(), fimport(), findFa(), fread.bed(), optimizeReads(), readWig()

Examples

bam_file <- system.file("extdata", "ribo-seq.bam", package = "ORFik")
readBam(bam_file, "UCSC")

[Package ORFik version 1.6.9 Index]