assays {SGSeq} | R Documentation

## Accessing and replacing assay data

### Description

Functions `counts` and `FPKM` are used to extract counts and FPKM values from `SGFeatureCounts` and `SGVariantCounts` objects. Function `variantFreq` is used to access relative usage estimates from `SGVariantCounts` objects.

### Usage

    FPKM(object, ...)

    FPKM(object, ...) <- value

    variantFreq(object)

    variantFreq(object) <- value

    ## S4 method for signature 'SGFeatureCounts'
    counts(object)

    ## S4 replacement method for signature 'SGFeatureCounts'
    counts(object) <- value

    ## S4 method for signature 'SGFeatureCounts'
    FPKM(object)

    ## S4 replacement method for signature 'SGFeatureCounts'
    FPKM(object) <- value

    ## S4 method for signature 'SGVariantCounts'
    counts(object, ...)

    ## S4 replacement method for signature 'SGVariantCounts'
    counts(object, ...) <- value

    ## S4 method for signature 'SGVariantCounts'
    FPKM(object, ...)

    ## S4 method for signature 'SGVariantCounts'
    variantFreq(object)

    ## S4 replacement method for signature 'SGVariantCounts'
    variantFreq(object) <- value

### Arguments

`object` | Object containing assay data
`...` | Arguments passed to method for `SGVariantCounts` objects. Argument `option` specifies whether the output should be based on the count of fragments compatible with the variant at the start (“variant5p”), end (“variant3p”) or either (“variant5pOr3p”) (the default), or whether output should be based on the count of fragments compatible with any variant belonging to the same event (“event5p” or “event3p”). Argument `min_anchor` specifies the minimum anchor length when computing FPKM values (defaults to 1).
`value` | Replacement value

### Value

Assay data for accessor functions or updated object for replacement functions.

### Author(s)

Leonard Goldstein

### Examples

    x <- counts(sgfc_pred)
    y <- FPKM(sgfc_pred)
    u <- counts(sgvc_pred, option = "variant5p")
    v <- FPKM(sgvc_pred, option = "variant5p")

[Package SGSeq version 1.26.0 Index]