eiAdd: Add new compounds

View source: R/core.R

eiAddR Documentation

Add new compounds

Description

Add additional compounds to and existing database

Usage

	eiAdd(runId,additions,dir=".",format="sdf",conn=defaultConn(dir),
		distance=getDefaultDist(descriptorType),
		updateByName = FALSE,...)

Arguments

runId

The id number identifying a particular set of settings for a database. This is generally the number returned by eiMakeDbIf your coming from an older version of eiR, you should not use this value instead of specifying r, d, descriptorType and refIddb,.

additions

The compounds to add. This can be either a file in sdf format, or and SDFset object.

dir

The directory where the "data" directory lives. Defaults to the current directory.

format

The format of the data given in additions. Currently only "sdf" is supported.

conn

Database connection to use.

distance

The distance function to be used to compute the distance between two descriptors. A default function is provided for "ap" and "fp" descriptors.

updateByName

If true we make the assumption that all compounds, both in the existing database and the given dataset, have unique names. This function will then avoid re-adding existing, identical compounds, and will update existing compounds with a new definition if a new compound definition with an existing name is given.

If false, we allow duplicate compound names to exist in the database, though not duplicate definitions. So identical compounds will not be re-added, but if a new version of an existing compound is added it will not update the existing one, it will add the modified one as a completely new compound with a new compound id.

...

Additional options passed to eiInit.

Details

New Compounds can be added to an existing database, however, the reference compounds cannot be changed. This will also update the matrix file in the run/job directory with the new compounds.

Author(s)

Kevin Horan

See Also

eiMakeDb eiPerformanceTest eiQuery

Examples


   library(snow)
   r<- 50
   d<- 40

   #initialize
   data(sdfsample)
   dir=file.path(tempdir(),"add")
   dir.create(dir)
   eiInit(sdfsample[1:99],dir=dir,skipPriorities=TRUE)

   #create compound db
   runId=eiMakeDb(r,d,numSamples=20,dir=dir)
      

   #find compounds similar two each query
   eiAdd(runId,sdfsample[100],dir=dir)



girke-lab/eiR documentation built on April 19, 2023, 12:52 p.m.