diff --git a/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/default.csv b/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/default.csv index df931358d3bf1f09e3019c2962e86b67db49fd45..60df4ef889231a80f107bbeabf435542ac978f49 120000 --- a/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/default.csv +++ b/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/default.csv @@ -1 +1 @@ -../../../0.6.4/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/default.csv \ No newline at end of file +../../../0.0.0/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/default.csv \ No newline at end of file diff --git a/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/extrapolated_intensity_correction.csv b/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/extrapolated_intensity_correction.csv index d687eccc58a11521d3512039c2dc6aa151f62e8b..e5dd2bb00d62407b17335d3dccfb372e0032a875 120000 --- a/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/extrapolated_intensity_correction.csv +++ b/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/extrapolated_intensity_correction.csv @@ -1 +1 @@ -../../../0.6.4/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/extrapolated_intensity_correction.csv \ No newline at end of file +../../../0.6.0/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/extrapolated_intensity_correction.csv \ No newline at end of file diff --git a/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/morphology.csv b/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/morphology.csv index c1efe4acd8b0910409e77b420856e9a111de4e4d..7226fece60aa2373b04b94f080c214d9a45e9ef7 120000 --- a/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/morphology.csv +++ b/data/0.6.5/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/morphology.csv @@ -1 +1 @@ -../../../0.6.4/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/morphology.csv \ No newline at end of file +../../../0.0.0/tables/sbem-6dpf-1-whole-segmented-nuclei-labels/morphology.csv \ No newline at end of file diff --git a/scripts/files/copy_helper.py b/scripts/files/copy_helper.py index 0ae50ae750175c9cf6f21a66f30c8eb21e415a4b..a28229a96681ef16fc75d578d13888c63673c13b 100644 --- a/scripts/files/copy_helper.py +++ b/scripts/files/copy_helper.py @@ -5,6 +5,23 @@ from .sources import get_image_names, get_segmentation_names, get_segmentations from ..attributes.base_attributes import write_additional_table_file +def make_squashed_link(src_file, dst_file, override=False): + + if os.path.exists(dst_file): + if override and os.path.islink(dst_file): + os.unlink(dst_file) + elif override and not os.path.islink(dst_file): + raise RuntimeError("Cannot override an actual file!") + elif not override: + return + + if os.path.islink(src_file): + src_file = os.path.realpath(src_file) + dst_folder = os.path.split(dst_file)[0] + rel_path = os.path.relpath(src_file, dst_folder) + os.symlink(rel_path, dst_file) + + def copy_file(xml_in, xml_out): h5path = get_h5_path_from_xml(xml_in, return_absolute_path=True) xml_dir = os.path.split(xml_out)[0] @@ -26,9 +43,11 @@ def copy_tables(src_folder, dst_folder, name): src_file = os.path.join(table_in, ff) dst_file = os.path.join(table_out, ff) - rel_path = os.path.relpath(src_file, table_out) - if not os.path.exists(dst_file): - os.symlink(rel_path, dst_file) + make_squashed_link(src_file, dst_file) + + # rel_path = os.path.relpath(src_file, table_out) + # if not os.path.exists(dst_file): + # os.symlink(rel_path, dst_file) # write the txt file for additional tables write_additional_table_file(table_out)