Learn R Programming

metagene (version 1.0.0)

parseBamFiles: Parse multiple bamFiles

Description

This function will fetch the aligned reads from multiple bam files that overlap with a list of regions.

Usage

parseBamFiles( bamFiles, featuresGroups, cores=1)

Arguments

bamFiles
A vector of bam files
featuresGroups
A list of data.frame. One data.frame by group of features. The names of each element of the list correspond to the name of the group.
cores
Number of cores for parallel processing (require parallel package).

Value

parseBamFiles returns a list of list of list that contains the raw counts for every features groups.

Examples

Run this code
  # Get a bam file name
  ## Not run: bamFileName <- system.file("extdata/align1_rep1.bam", package="metagene")

  # Load a feature file
  ## Not run: featuresFileName <- system.file("extdata/list1.txt", package="metagene")
  ## Not run: features <- metagene:::prepareFeatures(featuresFileName, specie="mouse")

  # Parse multiple bam files
  ## Not run: bam <- metagene:::parseBamFiles(bamFileName, features)

Run the code above in your browser using DataLab