Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
platy-browser-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Christian Tischer
platy-browser-data
Commits
be225b82
Commit
be225b82
authored
5 years ago
by
Constantin Pape
Browse files
Options
Downloads
Patches
Plain Diff
More work on migration scripts
parent
695af253
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
New storage layout
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mmpb/files/migration.py
+2
-1
2 additions, 1 deletion
mmpb/files/migration.py
mmpb/files/name_lookup.py
+34
-5
34 additions, 5 deletions
mmpb/files/name_lookup.py
with
36 additions
and
6 deletions
mmpb/files/migration.py
+
2
−
1
View file @
be225b82
...
...
@@ -66,7 +66,7 @@ def move_image_file(image_folder, xml_path):
copy_xml_with_newpath
(
new_xml_path
,
new_xml_path
,
new_rel_data_path
)
# update the h5 path in the new xml
return
{
new_name
:
get_image_properties
(
name
)}
return
{
new_name
:
get_image_properties
(
new_
name
)}
def
update_image_dict
(
image_folder
,
image_dict
):
...
...
@@ -145,6 +145,7 @@ def migrate_version(version):
# - remove segmentations folder (make sure it's empty)
# - remove bdv server config
clean_up
(
version_folder
)
# TODO make README for version
# migrate all the data in the raw folder
...
...
This diff is collapsed.
Click to expand it.
mmpb/files/name_lookup.py
+
34
−
5
View file @
be225b82
...
...
@@ -79,6 +79,9 @@ def update_name_lut():
# get rid of '-ariande' tag [sic]
if
'
-ariande
'
in
new_name
:
new_name
=
new_name
.
replace
(
'
-ariande
'
,
''
)
# replace '-mask' with '-segmented'
if
'
-mask
'
in
new_name
:
new_name
=
new_name
.
replace
(
'
-mask
'
,
'
-segmented
'
)
# update the gene / region names for prospr
# and make everything lowercase
...
...
@@ -102,19 +105,45 @@ def update_name_lut():
def
update_image_properties
():
global
IMAGE_PROPERTIES
for
name
in
FILE_NAME_LUT
:
for
name
in
FILE_NAME_LUT
.
values
()
:
properties
=
{}
table_folder
=
'
tables/%s
'
%
name
# prospr: Color Magenta
# value range 0 - 1000
if
name
.
startswith
(
'
prospr
'
):
if
'
virtual-cells
'
in
name
:
vc_table_folder
=
'
tables/%s
'
%
name
properties
.
update
({
'
ColorMap
'
:
'
Glasbey
'
,
'
TableFolder
'
:
vc_table_folder
})
properties
.
update
({
'
ColorMap
'
:
'
Glasbey
'
,
'
TableFolder
'
:
table_folder
})
else
:
properties
.
update
({
'
Color
'
:
'
Magenta
'
,
'
MinValue
'
:
0
,
'
MaxValue
'
:
1000
})
# TODO handle segmentations / masks
# TODO segmented / mask is not consistent, get rid of '-mask' tag?
# handle all special segmentations:
# - dynamic and with tables:
# -- cells
# -- cilia
# -- nuclei
elif
'
segmented-cells
'
in
name
:
paintera_project
=
''
table_update_function
=
''
# TODO postprocessing options in Dynamic
properties
.
update
({
'
ColorMap
'
:
'
Glasbey
'
,
'
TableFolder
'
:
table_folder
,
'
Dynamic
'
:
{
'
PainteraProject
'
:
paintera_project
,
'
TableUpdateFunction
'
:
table_update_function
}})
# - static but with tables:
# -- chromatin
# -- tissue
# -- ganglia
elif
(
'
segmented-chromatin
'
in
name
or
'
segmented-tissue
'
in
name
or
'
segmented-ganglia
'
in
name
):
properties
.
update
({
'
ColorMap
'
:
'
Glasbey
'
,
'
TableFolder
'
:
table_folder
})
# TODO is white correct ?
# all other segmentations are binary masks
elif
'
-segmented
'
in
name
:
properties
.
update
({
'
Color
'
:
'
White
'
,
'
MinValue
'
:
0
,
'
MaxValue
'
:
1
})
# em-raw: Color White
# value range 0 - 255
else
:
...
...
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