Learn R Programming

metagene (version 1.0.0)

rawCountsToRPM: Convert the raw counts into reads per million aligned (rpm)

Description

This function will convert raw counts into reads per million aligned (rpm) using the aligned reads counts obtained with the prepareBamFiles function.

Usage

rawCountsToRPM( rawCounts, bamFilesDescription, cores=1)

Arguments

rawCounts
The data structure returned by the parseBamFiles function.
bamFilesDescription
The data.frame obtained with the prepareBamFiles function.
cores
Number of cores for parallel processing (require parallel package).

Value

rawCountsToRPM returns a list of list of list that contains the rpm for every features groups.

Examples

Run this code
  # Get the description of the bam files
  ## Not run: bamFileName <- system.file("extdata/align1_rep1.bam", package="metagene")
  ## Not run: bamFileDescription <- metagene:::prepareBamFiles(bamFileName)

  # Get the raw counts
  ## Not run: bamFileName <- system.file("extdata/align1_rep1.bam", package="metagene")
  ## Not run: featuresFileName <- system.file("extdata/list1.txt", package="metagene")
  ## Not run: features <- metagene:::prepareFeatures(featuresFileName, specie="mouse")
  ## Not run: bamRawCounts <- metagene:::parseBamFiles(bamFileName, features)

  # Get the RPM values
  ## Not run: RPMcounts <- metagene:::rawCountsToRPM(bamRawCounts, bamFileDescription)

Run the code above in your browser using DataLab