loadBioassay {bioassayR} | R Documentation

## Add an assay to the database

### Description

Loads the results of a bioassay experiment (stored as a `bioassay` object) into the specified database. The data source specified in the `bioassay` object be added to the database with `addDataSource` before loading. If the assay identifier (aid) is already present in the database, an error is returned and no additional data is loaded.

### Usage

    loadBioassay(database, bioassay)

### Arguments

`database` | A `BioassayDB` database to load the data into.
`bioassay` | A `bioassay` object containing the data to load.

### Author(s)

Tyler Backman

### Examples

    ## create sample database
    myDatabaseFilename <- tempfile()
    mydb <- newBioassayDB(myDatabaseFilename, indexed=FALSE)

    ## parse example assay data
    extdata_dir <- system.file("extdata", package="bioassayR")
    assayDescriptionFile <- file.path(extdata_dir, "exampleAssay.xml")
    activityScoresFile <- file.path(extdata_dir, "exampleScores.csv")
    myAssay <- parsePubChemBioassay("1000", activityScoresFile, assayDescriptionFile)

    ## load bioassay into database
    addDataSource(mydb, description="PubChem BioAssay", version="unknown")
    loadBioassay(mydb, myAssay)

    ## disconnect from and delete sample database
    disconnectBioassayDB(mydb)
    unlink(myDatabaseFilename)

[Package bioassayR version 1.32.1 Index]