methods {signeR} | R Documentation

## SignExp class methods

### Description

setSamples: Define sample names for a SignExp object, according to the "names" argument.

setMutations: Define mutation names for a SignExp object, according to the "mutations" argument.

Normalize: Normalize a SignExp object so that the entries of each signature sum up to one.

Reorder_signatures: Change the order of the signatures in a SignExp object. New signature order wil be defined by the "ord" argument.

Reorder_samples: Change samples order, according to ord parameter.

Reorder_mutations: Change mutations order, according to ord parameter.

Average_sign: Exports an aproximation of the signatures obtained by the averages of the samples for the signature matrix P.

Median_sign: Exports an aproximation of the signatures obtained by the medians of the samples for signature matrix P.

Average_exp: Exports an aproximation of the exposures obtained by the averages of the samples for exposure matrix E.

Median_exp: Exports an aproximation of the exposures obtained by the medians of the samples for exposure matrix E.

### Usage

    ## S4 method for signature 'SignExp'
    setSamples(signexp_obj, names)
    ## S4 method for signature 'SignExp'
    setMutations(signexp_obj, mutations)
    ## S4 method for signature 'SignExp'
    Normalize(signexp_obj)
    ## S4 method for signature 'SignExp,numeric'
    Reorder_signatures(signexp_obj, ord)
    ## S4 method for signature 'SignExp,numeric'
    Reorder_samples(signexp_obj, ord)
    ## S4 method for signature 'SignExp,numeric'
    Reorder_mutations(signexp_obj, ord)
    ## S4 method for signature 'SignExp'
    Average_sign(signexp_obj, normalize=TRUE)
    ## S4 method for signature 'SignExp'
    Median_sign(signexp_obj, normalize=TRUE)
    ## S4 method for signature 'SignExp'
    Average_exp(signexp_obj, normalize=TRUE)
    ## S4 method for signature 'SignExp'
    Median_exp(signexp_obj, normalize=TRUE)

### Arguments

`signexp_obj` | a SignExp object returned by signeR function. e.g.: sig$SignExposures
`names` | Vector of sample names.
`mutations` | Vector of mutations, e.g. "C>A:TCG".
`normalize` | Whether the signatures should be normalized before extracting approximations. Default is TRUE.
`ord` | Vector with the new signature order.

### Value

setSamples, setMutations, Normalize and Reorder_* returns a modified SignExp object.
Average_sign, Median_sign, Average_exp and Median_exp return a matrix with the corresponding approximation.

### Examples

    # each function needs the SignExposures object
    # which is part of the result of the signeR() call
    signexp  <- Normalize(signatures$SignExposures)
    signexp  <- Reorder_signatures(signatures$SignExposures,ord=c(2,1))
    matrix_p <- Median_sign(signatures$SignExposures)
    # etc ...

    # see also
    vignette(package="signeR")

[Package signeR version 1.16.0 Index]