Skip to content

Commit

Permalink
Merge pull request #17 from qbicsoftware/chore/examples
Browse files Browse the repository at this point in the history
provide examples for property files
  • Loading branch information
wow-such-code authored Oct 30, 2024
2 parents 3421b1b + 1c55331 commit 410ea76
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 3 deletions.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ address) and their password, have to be provided.
In order to interact with openBIS (transfer of data and metadata), the respective credentials need
to be provided, as well.

**Everything but the passwords can be provided via the config file (config.txt):**
**Everything but the passwords can be provided via the config file (e.g. config.txt):**

* as=https://my-openbis-instance.de/openbis/openbis
* dss=https://my-openbis-instance.de/datastore_server
Expand All @@ -204,6 +204,34 @@ section **Transferring Sample Types to SEEK**).

* seek_openbis_sample_title=openBIS Name

In order to create certain objects in SEEK, user-provided mappings need to be provided via property
files placed in the same folder as the .jar. These are:

**experiment_type_to_assay_class.properties**

Here, openBIS experiment type codes are mapped to the assay class needed to create assay objects in
SEEK. Example entries:

PARAMETER_ESTIMATION=EXP
MASS_SPECTROMETRY_EXPERIMENT=EXP

**experiment_type_to_assay_type.properties**

Here, openBIS experiment type codes are mapped to the assay type property needed to create assay
objects in SEEK. Example entry:

MASS_SPECTROMETRY_EXPERIMENT=http://jermontology.org/ontology/JERMOntology#Proteomics

Other fitting assay types can be found using the JERM ontology browser:
https://bioportal.bioontology.org/ontologies/JERM/?p=classes&conceptid=http%3A%2F%2Fjermontology.org%2Fontology%2FJERMOntology%23Experimental_assay_type&lang=en

**dataset_type_to_asset_type.properties**

Here, openBIS dataset type codes are mapped to the asset type created in SEEK. Example entries:

SOURCE_CODE=documents
UNKNOWN=data_files

Refer to the help of the respective command or the examples below for more details.

### Transferring Sample Types to SEEK
Expand Down
3 changes: 3 additions & 0 deletions dataset_type_to_asset_type.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SOURCE_CODE=documents
UNKNOWN=data_files
TEST_DAT=data_files
2 changes: 2 additions & 0 deletions experiment_type_to_assay_class.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PARAMETER_ESTIMATION=EXP
MASS_SPECTROMETRY_EXPERIMENT=EXP
1 change: 1 addition & 0 deletions experiment_type_to_assay_type.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MASS_SPECTROMETRY_EXPERIMENT=http://jermontology.org/ontology/JERMOntology#Proteomics
64 changes: 64 additions & 0 deletions openbis_datatype_to_seek_attributetype.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8" ?>
<properties>
<entry type="INTEGER">
<seek_id>4</seek_id>
<seek_title>Integer</seek_title>
<seek_type>Integer</seek_type>
</entry>
<entry type="VARCHAR">
<seek_id>8</seek_id>
<seek_title>String</seek_title>
<seek_type>String</seek_type>
</entry>
<entry type="MULTILINE_VARCHAR">
<seek_id>7</seek_id>
<seek_title>Text</seek_title>
<seek_type>Text</seek_type>
</entry>
<entry type="REAL">
<seek_id>3</seek_id>
<seek_title>Real number</seek_title>
<seek_type>Float</seek_type>
</entry>
<entry type="TIMESTAMP">
<seek_id>1</seek_id>
<seek_title>Date time</seek_title>
<seek_type>DateTime</seek_type>
</entry>
<entry type="BOOLEAN">
<seek_id>16</seek_id>
<seek_title>Boolean</seek_title>
<seek_type>Boolean</seek_type>
</entry>
<entry type="CONTROLLEDVOCABULARY">
<seek_id>8</seek_id>
<seek_title>String</seek_title>
<seek_type>String</seek_type>
</entry>
<entry type="MATERIAL">
<seek_id>8</seek_id>
<seek_title>String</seek_title>
<seek_type>String</seek_type>
</entry>
<entry type="HYPERLINK">
<seek_id>8</seek_id>
<seek_title>String</seek_title>
<seek_type>String</seek_type>
</entry>
<entry type="XML">
<seek_id>7</seek_id>
<seek_title>Text</seek_title>
<seek_type>Text</seek_type>
</entry>
<entry type="SAMPLE">
<seek_id>5</seek_id>
<seek_title>Web link</seek_title>
<seek_type>String</seek_type>
</entry>
<entry type="DATE">
<seek_id>2</seek_id>
<seek_title>Date time</seek_title>
<seek_type>Date</seek_type>
</entry>
</properties>

4 changes: 2 additions & 2 deletions src/main/java/life/qbic/model/OpenbisSeekTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ public SeekStructure translateForRO(OpenbisExperimentWithDescendants experiment,
*/
private void parseConfigs() throws IOException, ParserConfigurationException, SAXException {
final String dataTypeToAttributeType = "openbis_datatype_to_seek_attributetype.xml";
final String datasetToAssaytype = "dataset_type_to_assaytype.properties";
final String datasetToAssaytype = "dataset_type_to_asset_type.properties";
final String experimentTypeToAssayClass = "experiment_type_to_assay_class.properties";
final String experimentTypeToAssayType = "openbis_experiment_type_to_seek_assaytype.properties";
final String experimentTypeToAssayType = "experiment_type_to_assay_type.properties";
this.experimentTypeToAssayType = PropertyReader.getProperties(experimentTypeToAssayType);
this.datasetTypeToAssetType = PropertyReader.getProperties(datasetToAssaytype);
this.experimentTypeToAssayClass = PropertyReader.getProperties(experimentTypeToAssayClass);
Expand Down

0 comments on commit 410ea76

Please sign in to comment.