Skip to content

Commit 4ba8b7e

Browse files
authored
Remove JSON plate metadata support (#106)
1 parent bb0a8d7 commit 4ba8b7e

6 files changed

Lines changed: 9 additions & 72 deletions

File tree

Rlabkey/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: Rlabkey
2-
Version: 3.2.2
3-
Date: 2024-06-06
2+
Version: 3.2.3
3+
Date: 2024-06-25
44
Title: Data Exchange Between R and 'LabKey' Server
55
Author: Peter Hussey
66
Maintainer: Cory Nathe <cnathe@labkey.com>

Rlabkey/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Changes in 3.2.3
2+
o Remove deprecated support for JSON based assay plate metadata
3+
14
Changes in 3.2.2
25
o Issue 50592: labkey.setDefaults to also clear the CSRF token cache when clearing the httr session cookies
36

Rlabkey/R/labkey.experiment.R

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ labkey.experiment.createMaterial <- function(config, sampleSetId = NULL, sampleS
6666

6767
## Create an ExpRun object
6868
##
69-
labkey.experiment.createRun <- function(config, dataInputs = NULL, dataOutputs = NULL, dataRows = NULL, materialInputs = NULL, materialOutputs = NULL, plateMetadata = NULL)
69+
labkey.experiment.createRun <- function(config, dataInputs = NULL, dataOutputs = NULL, dataRows = NULL, materialInputs = NULL, materialOutputs = NULL)
7070
{
7171
## check required parameters
7272
if (missing(config))
@@ -126,11 +126,6 @@ labkey.experiment.createRun <- function(config, dataInputs = NULL, dataOutputs =
126126

127127
run$dataRows <- rowsVector
128128
}
129-
130-
if (!is.null(plateMetadata))
131-
{
132-
run$plateMetadata = plateMetadata;
133-
}
134129
return (run)
135130
}
136131

Rlabkey/man/Rlabkey-package.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ schema objects (\code{labkey.getSchema}).
1818
\tabular{ll}{
1919
Package: \tab Rlabkey\cr
2020
Type: \tab Package\cr
21-
Version: \tab 3.2.2\cr
22-
Date: \tab 2024-06-06\cr
21+
Version: \tab 3.2.3\cr
22+
Date: \tab 2024-06-25\cr
2323
License: \tab Apache License 2.0\cr
2424
LazyLoad: \tab yes\cr
2525
}

Rlabkey/man/labkey.experiment.createRun.Rd

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Create an experiment run object.
77
\usage{
88
labkey.experiment.createRun(config,
99
dataInputs = NULL, dataOutputs = NULL, dataRows = NULL,
10-
materialInputs = NULL, materialOutputs = NULL, plateMetadata = NULL)
10+
materialInputs = NULL, materialOutputs = NULL)
1111
}
1212
\arguments{
1313
\item{config}{a list of base experiment object properties}
@@ -16,7 +16,6 @@ labkey.experiment.createRun(config,
1616
\item{dataRows}{(optional) a data frame containing data rows to be uploaded to the assay backed run}
1717
\item{materialInputs}{(optional) a list of experiment material objects to be used as material inputs to the run}
1818
\item{materialOutputs}{(optional) a list of experiment material objects to be used as material outputs to the run}
19-
\item{plateMetadata}{(optional) if the assay supports plate templates, the plate metadata object to upload}
2019
}
2120
\details{
2221
Create an experiment run object which can be used in the saveBatch function.
@@ -48,36 +47,6 @@ run <- labkey.experiment.createRun(
4847
labkey.experiment.saveBatch(baseUrl="http://labkey/", folderPath="home",
4948
protocolName=labkey.experiment.SAMPLE_DERIVATION_PROTOCOL, runList=run)
5049

51-
## import an assay run which includes plate metadata
52-
53-
df <- data.frame(participantId=c(1:3), visitId = c(10,20,30), welllocation = c("A1", "D11", "F12"))
54-
55-
runConfig <- fromJSON(txt='{"assayId": 310,
56-
"name" : "api imported run with plate metadata",
57-
"properties" : {
58-
"PlateTemplate" : "urn:lsid:labkey.com:PlateTemplate.Folder-6:d8bbec7d-34cd-1038-bd67-b3bd"
59-
}
60-
}')
61-
62-
plateMetadata <- fromJSON(txt='{
63-
"control" : {
64-
"positive" : {"dilution": 0.005},
65-
"negative" : {"dilution": 1.0}
66-
},
67-
"sample" : {
68-
"SA01" : {"dilution": 1.0, "ID" : 111, "Barcode" : "BC_111", "Concentration" : 0.0125},
69-
"SA02" : {"dilution": 2.0, "ID" : 222, "Barcode" : "BC_222"},
70-
"SA03" : {"dilution": 3.0, "ID" : 333, "Barcode" : "BC_333"},
71-
"SA04" : {"dilution": 4.0, "ID" : 444, "Barcode" : "BC_444"}
72-
}
73-
}')
74-
75-
run <- labkey.experiment.createRun(runConfig, dataRows = df, plateMetadata = plateMetadata)
76-
labkey.experiment.saveBatch(
77-
baseUrl="http://labkey/", folderPath="home",
78-
assayConfig=list(assayId = 310), runList=run
79-
)
80-
8150
}
8251
}
8352
\keyword{IO}

Rlabkey/man/labkey.experiment.saveBatch.Rd

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,36 +65,6 @@ run <- labkey.experiment.createRun(
6565
labkey.experiment.saveBatch(baseUrl="http://labkey/", folderPath="home",
6666
protocolName=labkey.experiment.SAMPLE_DERIVATION_PROTOCOL, runList=run)
6767

68-
## import an assay run which includes plate metadata
69-
70-
df <- data.frame(participantId=c(1:3), visitId = c(10,20,30), welllocation = c("A1", "D11", "F12"))
71-
72-
runConfig <- fromJSON(txt='{"assayId": 310,
73-
"name" : "api imported run with plate metadata",
74-
"properties" : {
75-
"PlateTemplate" : "urn:lsid:labkey.com:PlateTemplate.Folder-6:d8bbec7d-34cd-1038-bd67-b3bd"
76-
}
77-
}')
78-
79-
plateMetadata <- fromJSON(txt='{
80-
"control" : {
81-
"positive" : {"dilution": 0.005},
82-
"negative" : {"dilution": 1.0}
83-
},
84-
"sample" : {
85-
"SA01" : {"dilution": 1.0, "ID" : 111, "Barcode" : "BC_111", "Concentration" : 0.0125},
86-
"SA02" : {"dilution": 2.0, "ID" : 222, "Barcode" : "BC_222"},
87-
"SA03" : {"dilution": 3.0, "ID" : 333, "Barcode" : "BC_333"},
88-
"SA04" : {"dilution": 4.0, "ID" : 444, "Barcode" : "BC_444"}
89-
}
90-
}')
91-
92-
run <- labkey.experiment.createRun(runConfig, dataRows = df, plateMetadata = plateMetadata)
93-
labkey.experiment.saveBatch(
94-
baseUrl="http://labkey/", folderPath="home",
95-
assayConfig=list(assayId = 310), runList=run
96-
)
97-
9868
}
9969
}
10070
\keyword{IO}

0 commit comments

Comments
 (0)