isContaminant {mia} | R Documentation

## decontam functions

### Description

The `decontam` functions `isContaminant` and `isNotContaminant` are made available for `SummarizedExperiment` objects.

### Usage

    ## S4 method for signature 'SummarizedExperiment'
    isContaminant(
      seqtab,
      abund_values = "counts",
      name = "isContaminant",
      concentration = NULL,
      control = NULL,
      batch = NULL,
      threshold = 0.1,
      normalize = TRUE,
      detailed = TRUE,
      ...
    )

    ## S4 method for signature 'SummarizedExperiment'
    isNotContaminant(
      seqtab,
      abund_values = "counts",
      name = "isNotContaminant",
      control = NULL,
      threshold = 0.5,
      normalize = TRUE,
      detailed = FALSE,
      ...
    )

    addContaminantQC(x, name = "isContaminant", ...)

    ## S4 method for signature 'SummarizedExperiment'
    addContaminantQC(x, name = "isContaminant", ...)

    addNotContaminantQC(x, name = "isNotContaminant", ...)

    ## S4 method for signature 'SummarizedExperiment'
    addNotContaminantQC(x, name = "isNotContaminant", ...)

### Arguments

`seqtab, x` | a `SummarizedExperiment`
`abund_values` | A single character value for selecting the `assay` to use.
`name` | A name for the column of the colData in which the contaminant information should be stored.
`concentration` | `NULL` or a single `character` value. Defining a column with numeric values from the `colData` to use as concentration information. (default: `concentration = NULL`)
`control` | `NULL` or a single `character` value. Defining a column with logical values from the `colData` to define control and non-control samples. (default: `control = NULL`)
`batch` | `NULL` or a single `character` value. Defining a column with values interpretable as a factor from the `colData` to use as batch information. (default: `batch = NULL`)
`threshold` | numeric scalar. See `decontam:isContaminant` or `decontam:isNotContaminant`
`normalize, detailed` | logical scalar. See `decontam:isContaminant` or `decontam:isNotContaminant`
`...` | for `isContaminant`/ `isNotContaminant`: arguments passed on to `decontam:isContaminant` or `decontam:isNotContaminant` for `addContaminantQC`/`addNotContaminantQC`: arguments passed on to `isContaminant`/ `isNotContaminant`

### Value

for `isContaminant`/ `isNotContaminant` a `DataFrame` or for `addContaminantQC`/`addNotContaminantQC` a modified object of `class(x)`

### See Also

`decontam:isContaminant`, `decontam:isNotContaminant`

### Examples

    data(esophagus)
    # setup of some mock data
    colData(esophagus)$concentration <- c(1,2,3)
    colData(esophagus)$control <- c(FALSE,FALSE,TRUE)

    isContaminant(esophagus,
                  method = "frequency",
                  concentration = "concentration")
    esophagus <- addContaminantQC(esophagus,
                                  method = "frequency",
                                  concentration = "concentration")
    colData(esophagus)

    isNotContaminant(esophagus, control = "control")
    esophagus <- addNotContaminantQC(esophagus, control = "control")
    colData(esophagus)

[Package mia version 1.2.7 Index]