Skip to content

Commit f0ba260

Browse files
Documentation/attachments (#65)
* add readme * add regex description * include attachment readme in main readme Co-authored-by: Sven F <[email protected]>
1 parent fb8b5a5 commit f0ba260

File tree

2 files changed

+37
-13
lines changed

2 files changed

+37
-13
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,40 @@ A valid JSON object can look like this:
146146
"tumor": "no"
147147
}
148148
}
149-
```
149+
```
150+
151+
### Attachment Data
152+
153+
**Responsible dropbox:**
154+
[QBiC-register-exp-proj-attachment](drop-boxes/register-attachments-dropbox)
155+
156+
**openBIS structure:**
157+
158+
Attachments are attached to the Q_PROJECT_DETAILS experiment type and its sample type Q_ATTACHMENT_SAMPLE.
159+
160+
**Expected data structure**
161+
The data structure needs to be a root folder, containing a file `metadata.txt`.
162+
163+
Incoming structure overview:
164+
165+
```
166+
|-<anything> (top level folder name, normally a time stamp of upload time)
167+
|
168+
|- metadata.txt
169+
```
170+
171+
**Expected metadata**
172+
Metadata is expected to be denoted in line-separated key-value pairs, where key and value are separated by a '='. The following structure/pairs are expected:
173+
174+
```
175+
user=<the (optional) uploading user name>
176+
info=<short info about the file>
177+
barcode=<the sample code of the attachment sample>
178+
type=<the type of attachment: information or results>
179+
```
180+
The code of the attachment sample is built from the project code followed by three zeroes, conforming to the regular expression "Q[A-Z0-9]{4}000", e.g. QABCD000.
181+
182+
See code examples:
183+
https://github.com/qbicsoftware/attachi-cli/blob/master/attachi/attachi.py#L63
184+
https://github.com/qbicsoftware/projectwizard-portlet/blob/9c86f500b26af4cf2613cfae32e470bf5d50bf78/src/main/java/life/qbic/projectwizard/io/AttachmentMover.java#L145
185+

drop-boxes/register-attachments-dropbox/register-attachment-dropbox.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,6 @@ def process(transaction):
9292
sa.setExperiment(exp)
9393
info = None
9494

95-
#if isProject:
96-
#experiments = search_service.listExperiments("/" + space + "/" + project)
97-
#for e in experiments:
98-
# if project+"_INFO" in e.getExperimentIdentifier():
99-
# info = e
100-
#if not info:
101-
# info = transaction.createNewExperiment('/' + space + '/' + project + '/'+ project+'_INFO', "Q_PROJECT_DETAILS")
102-
#else:
103-
# info = transaction.getExperiment('/' + space + '/' + project + '/' + code)
104-
# register new experiment and sample
105-
#sa.setExperiment(info)
106-
# create new dataset
10795
dataSet = transaction.createNewDataSet("Q_PROJECT_DATA")
10896
dataSet.setMeasuredData(False)
10997
dataSet.setPropertyValue("Q_SECONDARY_NAME", secname)

0 commit comments

Comments
 (0)