if (FALSE) {
## create provenance params with material inputs and data outputs
library(Rlabkey)
mi <- data.frame(lsid=c("urn:lsid:labkey.com:Sample.251.MySamples:sample1",
"urn:lsid:labkey.com:Sample.251.MySamples:sample2"))
do <- data.frame(
lsid="urn:lsid:labkey.com:AssayRunTSVData.Folder-251:12c70994-7ce5-1038-82f0-9c1487dbd334")
p <- labkey.provenance.createProvenanceParams(name="step1", description="initial step",
materialInputs=mi, dataOutputs=do)
## create provenance params with object inputs (from an assay run)
oi <- labkey.selectRows(baseUrl="https://labkey.org/labkey/", folderPath = "Provenance",
schemaName="assay.General.titer",
queryName="Data",
colSelect= c("LSID"),
colFilter=makeFilter(c("Run/RowId","EQUAL","253")))
mi <- data.frame(lsid=c("urn:lsid:labkey.com:Sample.251.MySamples:sample1",
"urn:lsid:labkey.com:Sample.251.MySamples:sample2"))
p <- labkey.provenance.createProvenanceParams(name="step1", description="initial step",
objectInputs=oi[["LSID"]], materialInputs=mi)
## add run step properties and custom properties to the provenance params
props <- data.frame(
"urn:lsid:labkey.com:Vocabulary.Folder-996:ProvenanceDomain#version"=c(22.3),
"urn:lsid:labkey.com:Vocabulary.Folder-996:ProvenanceDomain#instrumentName"=c("NAb reader"),
check.names=FALSE)
params <- list()
params$comments <- "adding additional step properties"
params$activityDate <- "2022-3-21"
params$startTime <- "2022-3-21 12:35:00"
params$endTime <- "2022-3-22 02:15:30"
params$recordCount <- 2
p <- labkey.provenance.createProvenanceParams(recordingId=ra$recordingId, name="step2",
properties=props, params=params)
}
Run the code above in your browser using DataLab