loadBioassay: Add an assay to the database

Description Usage Arguments Author(s) Examples

View source: R/loadingData.R

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

1

Arguments

database

A BioassayDB database to load the data into.

bioassay

A bioassay object containing the data to load.

Author(s)

Tyler Backman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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)

bioassayR documentation built on March 1, 2021, 2 a.m.