RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
44 stars 21 forks source link

save_gs() with backend_opt = 'symlink" as a relative path #388

Open luigidolcetti opened 1 year ago

luigidolcetti commented 1 year ago

Hi, I was wondering if there is any chance the symlink can be a relative path instead of an absolute path (and how to do that). The reason I am asking it's because it would be usefull when sharing analysis results or to move an analysis to a different location and have things still working.

Thank you in advance, Luigi

mikejiang commented 1 year ago

honestly,symlink is not a reliable way to share or move data, "copy", "move" option are recommended in these use cases

luigidolcetti commented 1 year ago

Hi Mike, thank you very much for your reply. I see your point. Just, for the sake of pedantry let me explain the scenario I am into. Let's consider a pipeline that output a folder structure like the one below, where different independent gating sets are generated, for example bootstrapping in parallel some probabilistic clastering:

../root_folder ../root_folder/raw files .h5 ../root_folder/Analysis_1 ../root_folder/Analysis_1/some data for the analysis ../root_folder/Analysis_1/GS ../root_folder/Analysis_1/GS/GS_1 ../root_folder/Analysis_1/GS/.... ../root_folder/Analysis_1/GS/GS_n ../root_folder/Analysis_1/some results ../root_folder/Analysis_2 ../root_folder/Analysis_2/some data for the analysis ../root_folder/Analysis_2/GS ../root_folder/Analysis_2/GS/GS_1 ../root_folder/Analysis_2/GS/.... ../root_folder/Analysis_2/GS/GS_n ../root_folder/Analysis_2/some results

Having relative path links would probably result in being able to archive (and possibly deliver and reuse) the whole thing without writing extra code (... just updating to the new location the root folder in the script).

Would load_gs work, using save_gs(b_opt='skip') and making the relative symlink with an independent call to mklink (I am on win)?

Thanks, Luigi