Learn R Programming

epigenomix (version 1.12.0)

getAlignmentQuality: Calculation of basic alignments statistics

Description

Calculates some basic alignment statistics for given bam files.

Usage

getAlignmentQuality(bamFile, verbose = FALSE, mc.cores = 1)

Arguments

bamFile
A character vector with the filenames of the bam files
verbose
If set to TRUE, some status information is written to the R console.
mc.cores
Number of cores to be used.

Value

Returns a data frame with one row for each given bam file and the columns as listed in the details section.

Details

The given bam files should have marked duplicates and not uniquely mapped reads should have a quality value of 0. In detail, this function returns a data frame with the following columns:
Sample
File name without path and suffix

HeaderID
ID field from bam header, if available

HeaderSampleID
SM field from bam header, if available

HeaderLibraryID
LB field from bam header, if available

TotalReads
Total number of reads in bam file

MappedReads
Number of mapped Reads

MappedReadsRel
MappedReads/TotalReads

UniquelyMappedReads
Number of mapped reads with mapping quality larger 0

UniquelyMappedReadsRel
UniquelyMappedReads/MappedReads

UniquelyMappedUniqueReads
Number of non duplicated mapped reads with mapping quality larger 0

UniquelyMappedUniqueReadsRel
UniquelyMappedUniqueReads/MappedReads

NonRedundantFraction
UniquelyMappedUniqueReads/UniquelyMappedReads

QualMean
Mean mapping quality of all uniquely mapped unique reads

QualSd
Standard deviation of the mapping quality of all uniquely mapped unique reads

Quantile0
0% quantileof the mapping quality of all uniquely mapped unique reads

Quantile25
25% quantile of the mapping quality of all uniquely mapped unique reads

Quantile50
50% quantile of the mapping quality of all uniquely mapped unique reads

Quantile75
75% quantile of the mapping quality of all uniquely mapped unique reads

Quantile100
100% quantile of the mapping quality of all uniquely mapped unique reads

Path
Full path and file name as given in argument bamFile

Examples

Run this code
## Not run: getAlignmentQuality("myFile.bam")

Run the code above in your browser using DataLab