findEntities {Onassis} | R Documentation

## Method findEntities

### Description

This method finds concepts from a Conceptmapper Dictionary of type `CMdictionary` in a given directory or in a single pipe separated file containing a named document in each row, with a specified configuration of type `CMoptions`. This is a method of the `EntityFinder-class`

### Usage

    findEntities(object, inputDirOrFile, multipleDocs = FALSE,
      outDir = tempdir(), configOpt, cmDict)

      ## S4 method for signature
    ## 'EntityFinder,character,logical,character,CMoptions,CMdictionary'
    findEntities(object,
      inputDirOrFile, multipleDocs = FALSE, outDir = tempdir(), configOpt,
      cmDict)

### Arguments

`object` | instance of the class EntityFinder
`inputDirOrFile` | the directory where the files to annotate are stored or the text file to annotate. A single file containing in each row sample names, the | symbol and the description of the sample is also allowed.
`multipleDocs` | TRUE if a single file containing different text sources has been given as inputDirOrFile. FALSE if each text is in a separate file. Defaults to FALSE
`outDir` | The directory where the Conceptmapper annotated files are stored. Default: the system tmp directory.
`configOpt` | Object of type CMoptions in which the parameters to run Conceptmapper are stored
`cmDict` | Instance of class `CMdictionary` or the file path of an already created CMdictionary

### 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')
    annotations <- findEntities(ef,
    system.file('extdata', 'test_samples', 'test_samples.txt', package='Onassis'), multipleDocs=TRUE, outDir=getwd(),
     configOpt=opts, cmDict=dict)

[Package Onassis version 1.10.0 Index]