runFastQC {ngsReports} | R Documentation

## A wrapper for the bash shell command fastqc.

### Description

A convenient wrapper for the bash shell command fastqc. Only runs if Fastqc is installed.

### Usage

    runFastQC(
      object,
      outPath,
      threads = 1L,
      casava = FALSE,
      nofilter = FALSE,
      extract = FALSE,
      nogroup = FALSE,
      min_length = 1,
      contaminants = c(),
      adapters = c(),
      kmers = 7,
      exec
    )

    ## S4 method for signature 'ANY'
    runFastQC(
      object,
      outPath,
      threads = 1L,
      casava = FALSE,
      nofilter = FALSE,
      extract = FALSE,
      nogroup = FALSE,
      min_length = 1,
      contaminants = c(),
      adapters = c(),
      kmers = 7,
      exec
    )

    ## S4 method for signature 'FastqFile'
    runFastQC(
      object,
      outPath,
      threads = 1L,
      casava = FALSE,
      nofilter = FALSE,
      extract = FALSE,
      nogroup = FALSE,
      min_length = 1,
      contaminants = c(),
      adapters = c(),
      kmers = 7,
      exec
    )

    ## S4 method for signature 'FastqFileList'
    runFastQC(
      object,
      outPath,
      threads = 1L,
      casava = FALSE,
      nofilter = FALSE,
      extract = FALSE,
      nogroup = FALSE,
      min_length = 1,
      contaminants = c(),
      adapters = c(),
      kmers = 7,
      exec
    )

    ## S4 method for signature 'BamFile'
    runFastQC(
      object,
      outPath,
      threads = 1L,
      casava = FALSE,
      nofilter = FALSE,
      extract = FALSE,
      nogroup = FALSE,
      min_length = 1,
      contaminants = c(),
      adapters = c(),
      kmers = 7,
      exec
    )

    ## S4 method for signature 'BamFileList'
    runFastQC(
      object,
      outPath,
      threads = 1L,
      casava = FALSE,
      nofilter = FALSE,
      extract = FALSE,
      nogroup = FALSE,
      min_length = 1,
      contaminants = c(),
      adapters = c(),
      kmers = 7,
      exec
    )

### Arguments

`object` | A `FastqFileList`, `BamFileList`, `FastqFile`, `BamFile` or character vector of file paths with all objects coercible to a single one of these types.
`outPath` | The path to write the FastQC reports. Must exist as (for safety) it will not be created when calling this function
`threads` | The number of threads to run in parallel
`casava` | logical. Sets the `--casava` flag
`nofilter` | logical. Sets the `--nofilter` flag
`extract` | logical. Extract the zip files on completion of the report
`nogroup` | logical. Sets the grouping of bases for reads longer than 50bp
`min_length` | integer. Sets an artificial lower limit on the length of the sequence to be shown in the report.
`contaminants` | Path to an alternate file with contaminants. The structure of the file will not be checked. Refer to the `fastqc` help page for more details
`adapters` | Path to a file listing adapters to search for. The structure of the file will not be checked. Refer to the `fastqc` help page for more details
`kmers` | An integer between 2 and 10
`exec` | The location of the fastqc executable.

### Details

This is a simple wrapper function for controlling & running `fastqc` from within R. This can be very useful for controlling & documenting an entire pipeline from within knitr to produce a simple report

Takes a FastqFile, FastqFileList, BamFile or BamFileList. Alternatively paths to files which are coerecible to these objects can be passed.

Only the common functionality of FastQC is implemented, for more fine detail please call FastQC directly.

### Value

An list of paths to the output

### Author(s)

Stephen Pederson <stephen.pederson@adelaide.edu.au>

### Examples

    ## Not run:
    library(ShortRead)
    sp <- SolexaPath(system.file('extdata', package='ShortRead'))
    fl <- file.path(analysisPath(sp), "s_1_sequence.txt")
    f <- FastqFile(fl)
    # This requires a working installation of FastQC
    fqcFile <- runFastQC(f, outPath = tempdir())

    ## End(Not run)

[Package ngsReports version 1.6.1 Index]