CollectAlignmentSummaryMetrics: CollectAlignmentSummaryMetrics

View source: R/Picard.R

CollectAlignmentSummaryMetricsR Documentation

CollectAlignmentSummaryMetrics

Description

Produces a summary of alignment metrics from a SAM or BAM file with picard.

Usage

  CollectAlignmentSummaryMetrics(inBams, fastaFn,
                                 metricLevel = c("ALL_READS", "SAMPLE",
                                                 "LIBRARY", "READ_GROUP"),
                                 mc.cores=ezThreads())

Arguments

inBams

character(n): the filepaths of input bam files.

fastaFn

character(1): the filepath of reference genome file for mapping.

metricLevel

character(1): the level of summarisation. See details below.

mc.cores

integer(1): the threads to use.

Details

This function relies on the picard tools's CollectAlignmentSummaryMetrics. By default, it computes the metric on all reads of the bam file. When read group tag is used, it's recommended to summarise over “SAMPLE”, “LIBRARY” or “READ_GROUP”.

Value

A data.frame of metrics.

Author(s)

Ge Tan

References

http://broadinstitute.github.io/picard/picard-metric-definitions.html#AlignmentSummaryMetrics

Examples

  ## Not run: 
    inBam <- "/srv/gstore/projects/p2497/SCCountsApp_24762_2018-02-20--21-32-42/20171222.A-SiCSeq_SCs_P5.bam"
    fastaFn <- "/srv/GT/reference/Mus_musculus/Ensembl/GRCm38.p5/Sequence/WholeGenomeFasta/genome.fa"
    metricLevel <- "SAMPLE"
    CollectAlignmentSummaryMetrics(inBam, fastaFn, metricLevel)
  
## End(Not run)

uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.