getBowtie2AlignMetrics: Get Bowtie2 Alignment Metrics

getBowtie2AlignMetricsR Documentation

Get Bowtie2 Alignment Metrics

Description

Gets the reads counts for all the various alignment success categories from the (stderr) output of Bowtie2.

Usage

getBowtie2AlignMetrics(metricsFile, bowtieTiming = NULL, verbose = TRUE)

Arguments

metricsFile

the filename to receive all Bowtie2 output that got send to stderr.

bowtieTiming

a list of 2 proc.time objects that are the start and stop time of the Bowtie alignment step.

Details

Since the call to Bowtie2 is a pipe sending its output to samtools, the final summary counts that Bowtie2 reports get saved to a text file that captures stderr. This function extracts those counts and returns them to the R session that called Bowtie2.

Value

A list of numeric read counts (not the number of alignments).

RawReads

the count of reads in the input FASTQ file.

UniqueReads

the count of reads that aligned exactly once.

MultiReads

the count of reads that aligned >1 times.

NoHitReads

the count of reads that failed to aligned.

Time

the elapsed time of the call to Bowtie, as a elapsedProcTime object

Note

Dependant on the Bowtie2 version for successful parsing of Bowtie's count output. No rigorous testing for any runtime errors is done.


robertdouglasmorrison/DuffyNGS documentation built on March 24, 2024, 4:16 p.m.