annotateDF {Onassis} | R Documentation

## `annotateDF`

### Description

Method to find concepts from a Conceptmapper Dictionary of type `CMdictionary` contained in a given data frame, with a specified configuration of type `CMoptions`. This is a method of the `EntityFinder-class`

### Usage

    annotateDF(object, descr_df, outDir = tempdir(), configOpt, cmDict)

    ## S4 method for signature 'EntityFinder,data.frame,character,CMoptions'
    annotateDF(object,
      descr_df, outDir = tempdir(), configOpt, cmDict)

### Arguments

`object` | Instance of class `EntityFinder-class`
`descr_df` | the table of text to annotate. The data frame should have identifiers in the first column and descriptions or text in the rest of the columns.
`outDir` | the output directory
`configOpt` | instance of class `CMoptions-class`
`cmDict` | Object of type `CMdictionary-class` containing the reference to a previously created Conceptmapper dictionary. Alternatively the path to a Conceptmapper xml file can be passed.

### Value

A data frame of annotations containing the sample name, the id of the OBO concept, the corresponding name, the part of the text containing the annotation

### Examples

    obo <- system.file('extdata', 'sample.cs.obo', package='OnassisJavaLibs')
    dict <- CMdictionary(inputFileOrDb=obo, outputDir=getwd(), synonymType='ALL')
    opts <- CMoptions()
    ef <- new('EntityFinder')
    methylation <- readRDS(system.file('extdata', 'vignette_data',
    'GEOmethylation.rds', package='Onassis'))
    annotations <- annotateDF(ef, methylation[1:10, ], getwd(), opts, dict)

[Package Onassis version 1.2.7 Index]