publishToDB {maDB} | R Documentation |
publishToDB
With this function it is possible to insert all the data of a micro array experiment into a database with only one funciton call. Any database tables that are not present in the database will be created. By each call a Experiment
will be created in the experiments
table, over which the expression values from each micro array can be accessed.
currently only the PostgreSQL database is supported. The packages used are the Rdbi
, RdbiPgSQL
and the tkfiDB
.
publishToDB(object=NULL,connection=NULL,exp.name=NULL,exp.date=NULL,samples=NULL,signal.channels=NULL,global.transaction=TRUE,v=TRUE)
object |
The object from which the expression values can be read out (an instance of the EexprSet object). |
connection |
The database connection, created for example with the dbConnect function. |
exp.name |
The experiment name (project name would be better). This name has to be unique in the database! |
exp.date |
The date of the experiment. Optional; as additional information the publishing date will automoatically be inserted in the database. |
samples |
A list of, or a single representation of a Sample object, that contains information about the samples hybridized on the chips. If the sample does already exist in the database, it will not be added. The function checks upon the attributes of the submitted samples, if a sample that has the same attributes exists in the database and in this case the reference of the signal channel and this specific sample will be created (see also the code{getPK} function). So it should be possible later on to get all micro array data from one sample out of the database, if it was used in different experiments. This parameter can also be omitted (so no sample information will be available for this array!) |
signal.channels |
The linking element between the chips used, and the samples hybridized onto (2 samples per chip in two color micro arrays, one in Affymetrix GeneChips). The list of SignalChannel objects submitted by this parameter should be the same of overall signal channels in the experiment (this means for example that a list of 8 SignalChannels has to be submitted in a micro array experiment consiting of 4 two channel micro arrays. Each channel should contain the link to the micro array (as index of the corresponding array in the exprs table) and the link to the sample (as index to the sample in the list submitted as samples).) By calling the getSignalChannels method on the EexprSet object, a list of the signal channels in the specific experiment will be returned, so one has only to update the array.index and sample.index slots of each SignalChannel. If samples are submitted, this parameter has also be submitted, if no samples are submitted, also this parameter can be omitted. |
global.transaction |
If a global transaction should be used for the whole funciton call. The benefit of this is, that if any errors occurr during the function call, no data will be written into the database. It is always a good idea to send a transaction rollback call to the database (e.g. dbSendQuery(Con,"ROLLBACK TRANSACTION;")) if any exceptions occurred, to be shure that the database will not get inconsitent. |
v |
If TRUE additional informations will be printed to the console. |
Johannes Rainer
getSignalChannels
EexprSet-class
SignalChannel-class
Sample-class
getPK
loadFromDB