importNgsLogs {ngsReports} | R Documentation

## Import Various NGS-related log files

### Description

Imports NGS-related log files such as those generated from stderr

### Usage

    importNgsLogs(x, type, which = 1)

### Arguments

`x` | `character`. Vector of filenames. All log files must be of the same type. Duplicate file paths will be silently ignored.
`type` | `character`. The type of file being imported. Can be one of `bowtie`, `bowtie2`, `hisat2`, `star` or `duplicationMetrics`
`which` | Which element of the parsed object to return. Ignored in all file types except `type = "duplicationMetrics"`, which can return either the metrics or the data supplied as a histogram. Defaults to the metrics data.

### Details

Imports one or more log files as output by tools such as: `bowtie`, `bowtie2`, `Hisat2` `STAR` or `picard MarkDuplicates`

### Value

A `tibble`. Column names are broadly similar to the text in supplied files, but have been modified for easier handling under R naming conventions.

### Examples

    f <- c("bowtiePE.txt", "bowtieSE.txt")
    bowtieLogs <- system.file("extdata", f, package = "ngsReports")
    df <- importNgsLogs(bowtieLogs, type = "bowtie")

[Package ngsReports version 1.0.1 Index]