Dealing with locked files with "datalad run"

Hi – I suspect I’m just using datalad run incorrectly, but I’m having trouble using it on files that I’ve already saved because they’re locked. I was hoping the --input flag in datalad run would solve this, but it looks like that command only gets files that aren’t in the dataset. Here’s my basic workflow, which might need revision!

  1. generate bids data with heudiconv
  2. save results: datalad save . -m "add bids data for sub-${sub}"
  3. preprocess: datalad run -m "preprocess sub-${sub}" --input "bids/sub-${sub}/*" --output "derivatives/fmriprep/*" "bash code/ ${sub}"

When I run things like that, it can’t find the input files because they remain locked. If I label my input as my output (i.e., --output "bids/sub-${sub}/*"), it works fine since it unlocks the files in the bids directory. But, clearly this is not what I’m supposed to be doing, so any guidance or clarification would be much appreciated.


Sorry, for a late reply. But I think something is under described here or may be it was some bug in fmriprep at that early time: fmriprep should not modify input bids dataset, so no unlocking should be necessary. “can’t find” has nothing to do with unlocking unless fmriprep had some bug in following symlinks and getting lost in e.g. finding nearby sidecar files. If you could demonstrate the problem (if still there) with cut/pasted output from such a run – it would help to resolve the mystery.

Thanks and sorry for my late reply! I still need to see if I can reproduce this issue with the latest version of fmriprep and datalad. At the time, it seemed like the “input” and “output” arguments in datalad were not clear, though I likely didn’t have a good grasp of the handbook. I need to spend more time with the handbook and revise my workflow here. Thanks again and sorry for the noise.