Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LinkAhead Sample Management
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
LinkAhead Sample Management
Commits
5fa73e89
Commit
5fa73e89
authored
1 month ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Use correct datamodel in special tretment lists
parent
206daaef
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
F awi sams
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sample-management-custom/caosdb-server/scripting/bin/sample_helpers/sample_upload_column_definitions.py
+20
-67
20 additions, 67 deletions
...ng/bin/sample_helpers/sample_upload_column_definitions.py
with
20 additions
and
67 deletions
sample-management-custom/caosdb-server/scripting/bin/sample_helpers/sample_upload_column_definitions.py
+
20
−
67
View file @
5fa73e89
...
...
@@ -57,115 +57,68 @@ def _use_custom_names(definition: Union[list, dict]):
DATATYPE_DEFINITIONS
=
_use_custom_names
({
"
AphiaID
"
:
int
,
"
entity_id
"
:
str
,
"
Campaign
"
:
str
,
"
Fixation
"
:
str
,
"
Gear configuration
"
:
str
,
"
Gear
"
:
str
,
"
Hol
"
:
int
,
"
Elevation start
"
:
float
,
"
Elevation stop
"
:
float
,
"
Latitude start
"
:
float
,
"
Latitude stop
"
:
float
,
"
Longitude start
"
:
float
,
"
Longitude stop
"
:
float
,
"
Main User
"
:
str
,
"
Nagoya case number
"
:
str
,
"
PI
"
:
str
,
"
Parent LinkAhead ID
"
:
str
,
"
Platform
"
:
str
,
"
Sample Context
"
:
str
,
"
Sample container
"
:
str
,
"
SampleMethod
"
:
str
,
"
SampleType
"
:
str
,
"
SampleTypeSpecific
"
:
str
,
"
Sampling Person
"
:
str
,
"
Sampling depth start
"
:
float
,
"
Sampling depth stop
"
:
float
,
"
Sampling method
"
:
str
,
"
Station ID
"
:
str
,
"
Station number
"
:
str
,
"
Storage Container Label
"
:
str
,
"
Storage ID
"
:
str
,
"
StorageTemperature
"
:
str
,
"
Subevent
"
:
str
,
"
Water depth start
"
:
float
,
"
Water depth stop
"
:
float
,
"
entity_id
"
:
str
,
})
# Obligatory columns: Must exist and must not be empty
# Must exist
OBLIGATORY_COLUMNS
=
_use_custom_names
([
"
entity_id
"
,
"
Device
"
,
"
Latitude start
"
,
"
Longitude start
"
,
"
Main User
"
,
"
PI
"
,
"
Sample container
"
,
"
SampleType
"
,
"
Sphere
"
,
"
Storage ID
"
,
"
StorageTemperature
"
,
])
OBLIGATORY_COLUMNS_CHILD
=
_use_custom_names
([
"
entity_id
"
,
"
Main User
"
,
"
Parent LinkAhead ID
"
,
"
Sample container
"
,
"
SampleType
"
,
"
SampleTypeSpecific
"
,
"
Sphere
"
,
"
Storage ID
"
,
"
StorageTemperature
"
,
])
COLUMN_CONVERTER
=
_use_custom_names
({
"
Collection
"
:
semicolon_separated_list
,
"
Ecotaxa URL
"
:
semicolon_separated_list
,
"
NCBI Accession
"
:
semicolon_separated_list
,
"
NCBI BioProject
"
:
semicolon_separated_list
,
"
NCBI BioSample
"
:
semicolon_separated_list
,
"
OSIS URL
"
:
semicolon_separated_list
,
"
Collector
"
:
semicolon_separated_list
,
"
Curator
"
:
semicolon_separated_list
,
"
Embargo
"
:
_embargo_converter
,
"
Publications
"
:
semicolon_separated_list
,
"
Event responsible
"
:
semicolon_separated_list
,
"
Sphere
"
:
semicolon_separated_list
,
})
SPECIAL_TREATMENT_SAMPLE
=
_use_custom_names
([
"
entity_id
"
,
"
Collection
"
,
"
Gear configuration
"
,
"
Gear
"
,
"
Hol
"
,
"
Biome
"
,
"
Campaign
"
,
"
Elevation start
"
,
"
Elevation stop
"
,
"
End date
"
,
"
Event responsible
"
,
"
IGSN DOI
"
,
"
Latitude start
"
,
"
Latitude stop
"
,
"
Level
"
,
"
Locality description
"
,
"
Locality name
"
,
"
Longitude start
"
,
"
Longitude stop
"
,
"
Main User
"
,
"
Nagoya case number
"
,
"
PDFReport
"
,
"
PI
"
,
"
Parent Linkahead ID
"
,
"
Person
"
,
"
Sampling Person
"
,
"
Sampling depth start
"
,
"
Sampling depth stop
"
,
"
Sphere
"
,
"
Station ID
"
,
"
Station number
"
,
"
Storage Container Label
"
,
"
Sphere
"
,
"
Start date
"
,
"
Storage ID
"
,
"
Subevent
"
,
"
Water depth start
"
,
"
Water depth stop
"
,
"
entity_id
"
,
])
IGNORED_COLUMN_NAMES_SAMPLE
=
_use_custom_names
([
"
LinkAhead URL
"
,
"
IGSN URL
"
,
"
IGSN
"
,
# TODO This will be relevant for external IGSNs in the future.
"
Parent Sample
"
,
"
Sampling depth
"
,
"
Storage chain
"
,
"
Water depth
"
,
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment