Skip to content
Snippets Groups Projects
Commit 4bc50d05 authored by Constantin Pape's avatar Constantin Pape
Browse files

Add chromatin segmentation to data

parent 28f13eb2
No related branches found
No related tags found
No related merge requests found
<SpimData version="0.2">
<BasePath type="relative">.</BasePath>
<SequenceDescription>
<ImageLoader format="bdv.hdf5">
<hdf5 type="relative">sbem-6dpf-1-whole-segmented-chromatin-labels.h5</hdf5>
</ImageLoader>
<ViewSetups>
<Attributes name="channel">
<Channel>
<id>1</id>
<name>1</name>
</Channel>
</Attributes>
<ViewSetup>
<id>0</id>
<name>channel 1</name>
<size>13750 12958 11416</size>
<voxelSize>
<unit>micrometer</unit>
<size>0.02 0.02 0.025</size>
</voxelSize>
<attributes>
<channel>1</channel>
</attributes>
</ViewSetup>
</ViewSetups>
<Timepoints type="range">
<first>0</first>
<last>0</last>
</Timepoints>
</SequenceDescription>
<ViewRegistrations>
<ViewRegistration setup="0" timepoint="0">
<ViewTransform type="affine">
<affine>0.02 0.0 0.0 0.0 0.0 0.02 0.0 0.0 0.0 0.0 0.025 0.0</affine>
</ViewTransform>
</ViewRegistration>
</ViewRegistrations>
</SpimData>
......@@ -8,6 +8,7 @@ import h5py
from scripts.files import make_folder_structure
from scripts.export import export_segmentation
from scripts.files import make_bdv_server_file, copy_image_data, copy_misc_data
from scripts.files import copy_segmentation
from scripts.attributes import make_nucleus_tables, make_cell_tables
from pybdv.converter import make_bdv
......@@ -71,6 +72,18 @@ def make_prospr_region_segmentations():
unit='micrometer', resolution=[0.5, 0.5, 0.5])
def insert_chromatin():
src_folder = 'data/rawdata'
dst_folder = 'data/0.2.0'
name = 'sbem-6dpf-1-whole-segmented-chromatin-labels'
copy_segmentation(src_folder, dst_folder, name)
src_table = '/g/arendt/EM_6dpf_segmentation/EM-Prospr/tables/em-segmented-chromatin-labels.csv'
dst_table = os.path.join(dst_folder, 'tables', name)
os.makedirs(dst_table, exist_ok=True)
dst_table = os.path.join(dst_table, 'base.csv')
copyfile(src_table, dst_table)
def make_initial_version():
src_folder = 'data/rawdata'
......@@ -96,7 +109,7 @@ def make_initial_version():
os.path.join(folder, 'misc', 'bdvserver.txt'))
if __name__ == '__main__':
insert_chromatin()
# make_prospr_region_segmentations()
make_initial_version()
# make_initial_version()
......@@ -102,8 +102,11 @@ def export_segmentations(folder, new_folder,
copy_segmentation(folder, new_folder, NAME_CILIA)
# copy static segmentations
# we also treat the chromatin segmentation as static for now,
# but might change this at some point
static_seg_names = ('sbem-6dpf-1-whole-segmented-muscles',
'sbem-6dpf-1-whole-segmented-tissue-labels')
'sbem-6dpf-1-whole-segmented-tissue-labels',
'sbem-6dpf-1-whole-segmented-chromatin-labels')
for seg_name in static_seg_names:
copy_segmentation(folder, new_folder, seg_name)
......@@ -134,7 +137,8 @@ def make_attributes(folder, new_folder,
copy_tables(folder, new_folder, NAME_CILIA)
# copy tables associated with static segmentations
static_seg_names = ('sbem-6dpf-1-whole-segmented-tissue-labels',)
static_seg_names = ('sbem-6dpf-1-whole-segmented-tissue-labels',
'sbem-6dpf-1-whole-segmented-chromatin-labels')
for seg_name in static_seg_names:
copy_tables(folder, new_folder, seg_name)
......@@ -198,7 +202,10 @@ def update_platy_browser(update_cell_segmentation=False,
update_cell_tables,
update_nucleus_tables,
update_cilia_tables)
if not update_dict['have_changes']:
# if an explicit tag was given, we force an update
force_update = new_tag != ''
if not update_dict['have_changes'] and not force_update:
print("Nothing needs to be update, skipping")
return
......@@ -240,6 +247,8 @@ def update_platy_browser(update_cell_segmentation=False,
update_cilia_tables,
target=target, max_jobs=max_jobs)
# TODO add some quality control that cheks that all files are there
# TODO implement make release properly
return
# make new release
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment