assignMissingID {CAGEfightR} | R Documentation

## Annotate ranges with missing IDs.

### Description

This function can relabel ranges with missing IDs (i.e. returned by assignTxID and assignGeneID), in case they need to be retained for further analysis.

### Usage

    assignMissingID(object, ...)

    ## S4 method for signature 'character'
    assignMissingID(object, prefix = "Novel")

    ## S4 method for signature 'GenomicRanges'
    assignMissingID(object, outputColumn = "geneID", prefix = "Novel")

    ## S4 method for signature 'RangedSummarizedExperiment'
    assignMissingID(object, outputColumn = "geneID", prefix = "Novel")

### Arguments

`object` | character, GRanges or RangedSummarizedExperiment: IDs to have NAs replaces with new IDs.
`...` | additional arguments passed to methods.
`prefix` | character: New name to assign to ranges with missing IDs, in the style prefix1, prefix2, etc.
`outputColumn` | character: Name of column to hold txID values.

### Value

object with NAs replaced in outputColumn

### See Also

Other Annotation functions: `assignGeneID()`, `assignTxID()`, `assignTxType()`

### Examples

    data(exampleUnidirectional)

    # Obtain gene models from a TxDb-object:
    library(TxDb.Mmusculus.UCSC.mm9.knownGene)
    txdb <- TxDb.Mmusculus.UCSC.mm9.knownGene

    # Assign geneIDs using only TC peaks:
    exampleUnidirectional <- assignGeneID(exampleUnidirectional,
                                          geneModels=txdb,
                                          outputColumn='geneID',
                                          swap='thick')

    # Replace NAs with 'Novel'
    assignMissingID(exampleUnidirectional)

    # Replace NAs with 'NovelTSS'
    assignMissingID(exampleUnidirectional, prefix = 'NovelTSS')

[Package CAGEfightR version 1.14.0 Index]