Learn R Programming

metagene (version 2.0.0)

Bam_Handler: A class to manage BAM files.

Description

This class will allow to load, convert and normalize alignments and regions files/data.

Usage

Bam_Handler

Arguments

Value

Bam_Handler$new returns a Bam_Handler object which contains coverage related information for every BAM files.

Format

A BAM manager

Constructor

bh <- Bam_Handler$new(bam_files, cores = SerialParam())
bam_files
A vector of BAM filenames. The BAM files must be indexed. i.e.: if a file is named file.bam, there must be a file named file.bam.bai in the same directory.
cores
The number of cores available to parallelize the analysis. Either a positive integer or a BiocParallelParam. Default: SerialParam().
Bam_Handler$new returns a Bam_Handler object that contains and manages BAM files. Coverage related information as alignment count can be obtain by using this object.

Methods

bh$get_aligned_count(bam_file)
bam_file
The name of the BAM file.
bh$get_rpm_coefficient(bam_file)
bam_file
The name of the BAM file.
bh$index_bam_files(bam_files)
bam_files
A vector of BAM filenames.
bh$get_bam_files()
bh$get_normalized_coverage(bam_file, regions)
bam_file
The name of the BAM file.
regions
A not empty GRanges object.

Examples

Run this code
bh <- metagene:::Bam_Handler$new(bam_files=get_demo_bam_files())
 bh$get_aligned_count(metagene:::get_demo_bam_files()[1])

Run the code above in your browser using DataLab