readSamtoolsStats: Parse samtools stat output

Description Usage Arguments Value Examples

View source: R/parse.R

Description

readSamtoolsStats parses output of samtools stat making it easy to work with it in R.

Usage

1
2
readSamtoolsStats(file, section = c("SN", "FFQ", "LFQ", "GCF", "GCL",
  "GCC", "IS", "RL", "ID", "IC", "COV", "GCD"))

Arguments

file

the name of the file which the data are to be read from. File must be of type character, providing path to input file. If it does not provide an absolute path(s), the file name is relative to the current working directory, getwd().

section

A character vector of patterns to extract from the report. Each section of samtools stats report is uniquley labeled, for example Summary Numbers are labeled as SN. By default all sections are read.

Value

list of data frames holding data from different parts of samtools stat output. Sections names are: SN (summary numbers), FFQ (first fragment qualities), LFQ (last fragment qualities), GCF (GC Content of first fragments), GCL (GC content of last fragments), GCC (ACGT content per cycle), IS (insert size), RL (read lengths), ID (indel distribution), IC (indels per cycle), COV (coverage distribution), GCD (GC-depth)

Examples

1
readSamtoolsStats(file = system.file('extdata', 'sample1', package = 'sumsamstats'))

mcjmigdal/sumsamstats documentation built on July 11, 2021, 10:47 a.m.