findEntities: Method findEntities

Description Usage Arguments Value Examples

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

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
8
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)

Onassis documentation built on Nov. 8, 2020, 8:18 p.m.