Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,40 @@ A valid JSON object can look like this:
"tumor": "no"
}
}
```
```

### Attachment Data

**Responsible dropbox:**
[QBiC-register-exp-proj-attachment](drop-boxes/register-attachments-dropbox)

**openBIS structure:**

Attachments are attached to the Q_PROJECT_DETAILS experiment type and its sample type Q_ATTACHMENT_SAMPLE.

**Expected data structure**
The data structure needs to be a root folder, containing a file `metadata.txt`.

Incoming structure overview:

```
|-<anything> (top level folder name, normally a time stamp of upload time)
|
|- metadata.txt
```

**Expected metadata**
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:

```
user=<the (optional) uploading user name>
info=<short info about the file>
barcode=<the sample code of the attachment sample>
type=<the type of attachment: information or results>
```
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.

See code examples:
https://github.com/qbicsoftware/attachi-cli/blob/master/attachi/attachi.py#L63
https://github.com/qbicsoftware/projectwizard-portlet/blob/9c86f500b26af4cf2613cfae32e470bf5d50bf78/src/main/java/life/qbic/projectwizard/io/AttachmentMover.java#L145

Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,6 @@ def process(transaction):
sa.setExperiment(exp)
info = None

#if isProject:
#experiments = search_service.listExperiments("/" + space + "/" + project)
#for e in experiments:
# if project+"_INFO" in e.getExperimentIdentifier():
# info = e
#if not info:
# info = transaction.createNewExperiment('/' + space + '/' + project + '/'+ project+'_INFO', "Q_PROJECT_DETAILS")
#else:
# info = transaction.getExperiment('/' + space + '/' + project + '/' + code)
# register new experiment and sample
#sa.setExperiment(info)
# create new dataset
dataSet = transaction.createNewDataSet("Q_PROJECT_DATA")
dataSet.setMeasuredData(False)
dataSet.setPropertyValue("Q_SECONDARY_NAME", secname)
Expand Down