diff --git a/analysis/correct_intensities.py b/analysis/correct_intensities.py index 37d5664010c0121b4fa1cd6c097fed4b7bc03b37..253b853f0c887fe1b339950ae19700938b647d13 100644 --- a/analysis/correct_intensities.py +++ b/analysis/correct_intensities.py @@ -60,7 +60,6 @@ def correct_intensities_test(target='local', max_jobs=32): target=target, max_jobs=max_jobs) -# FIXME scale 0 is damaged in the h5 file ! def correct_intensities(target='slurm', max_jobs=250): raw_path = '../data/rawdata/sbem-6dpf-1-whole-raw.h5' tmp_folder = './tmp_intensity_correction' @@ -185,6 +184,6 @@ def make_extrapolation_mask(): if __name__ == '__main__': - # correct_intensities('slurm', 125) - make_subsampled_volume() + correct_intensities('local', 1) + # make_subsampled_volume() # make_extrapolation_mask() diff --git a/scripts/attributes/master.py b/scripts/attributes/master.py index ffc57757c32947d3e0efdcf14d7892fb298c6782..799a9600b90aaace3e3f1b98a7df39d8db895cfa 100644 --- a/scripts/attributes/master.py +++ b/scripts/attributes/master.py @@ -50,9 +50,9 @@ def make_cell_tables(old_folder, folder, name, tmp_folder, resolution, tmp_folder, target) # make table with gene mapping via VCs - vc_vol_path = os.path.join('segmentations', 'prospr-6dpf-1-whole-virtual-cells-labels.xml') - vc_vol_path = get_h5_path_from_xml(vc_vol_path, return_absolute_path=True) - vc_expression_path = os.path.join('tables', 'prospr-6dpf-1-whole-virtual-cells-labels', 'profile_clust_curated.csv') + vc_vol_path = get_seg_path(folder, 'prospr-6dpf-1-whole-virtual-cells-labels', 't00000/s00/0/cells') + vc_expression_path = os.path.join(folder, 'tables', + 'prospr-6dpf-1-whole-virtual-cells-labels', 'profile_clust_curated.csv') med_expression_path = gene_out vc_out = os.path.join(table_folder, 'vc_assignments.csv') vc_assignment_table(seg_path, vc_vol_path, vc_expression_path, diff --git a/scripts/default_config.py b/scripts/default_config.py index c0ac72965f74d1c3186b8be27b63c410910e0aa6..5ec3402070ef680b2218721c81c73c24152f925b 100644 --- a/scripts/default_config.py +++ b/scripts/default_config.py @@ -3,8 +3,10 @@ import json from cluster_tools.cluster_tasks import BaseClusterTask DEFAULT_GROUP = os.environ.get('PLATYBROWSER_GROUP', 'kreshuk') +# DEFAULT_SHEBANG = os.environ.get('PLATYBROWSER_SHEBANG', +# '#! /g/arendt/EM_6dpf_segmentation/platy-browser-data/software/conda/miniconda3/envs/platybrowser/bin/python') DEFAULT_SHEBANG = os.environ.get('PLATYBROWSER_SHEBANG', - '#! /g/arendt/EM_6dpf_segmentation/platy-browser-data/software/conda/miniconda3/envs/platybrowser/bin/python') + '#! /g/kreshuk/pape/Work/software/conda/miniconda3/envs/cluster_env37/bin/python') DEFAULT_BLOCK_SHAPE = [64, 512, 512] diff --git a/update_patch.py b/update_patch.py index 23716e987f90e1efe8c8c47dac4c239f1c1acdb0..0761cc72dd35c347077ef2bcd5f2404ffb1501b3 100755 --- a/update_patch.py +++ b/update_patch.py @@ -58,16 +58,24 @@ def update_table(name, seg_dict, folder, new_folder, def update_tables(folder, new_folder, names_to_update, target, max_jobs): segmentations = get_segmentations() + # first copy all tables that just need to be copied for name, seg in segmentations.items(): has_table = seg.get('has_tables', False) or 'table_update_function' in seg - if name in names_to_update: - if not has_table: - raise RuntimeError("Segmentation %s does not have a table:" % name) - update_table(name, seg, folder, new_folder, - target, max_jobs) - else: - if has_table: - copy_tables(folder, new_folder, name) + needs_update = name in names_to_update + if not has_table or needs_update: + continue + copy_tables(folder, new_folder, name) + + # now update all tables that need to be updated + for name, seg in segmentations.items(): + has_table = seg.get('has_tables', False) or 'table_update_function' in seg + needs_update = name in names_to_update + if not needs_update: + continue + if needs_update and not has_table: + raise RuntimeError("Segmentation %s does not have a table:" % name) + update_table(name, seg, folder, new_folder, + target, max_jobs) # TODO check for errors