harbor run -t openthoughts/tasktrove-exp-flat25-subtle-debug-v3-5k-subtle-4041harbor download openthoughts/tasktrove-exp-flat25-subtle-debug-v3-5k-subtle-4041Workspace status: There is a partially broken implementation at /app/starter_code.py. The agent must fix the bugs and complete the implementation.
Task: Fix and complete an R-script generation extension for Nipype’s WhiteStripe interface
Description: The repository contains a partially implemented extension that should patch or wrap Nipype’s WhiteStripe interface so that it can generate a precise R script to perform WhiteStripe normalization in R, rather than executing a shell command. The extension must integrate with the interface’s normal input fields and produce an exact script string that matches the test’s expected content.
What to implement:
A small extension/module that patches or wraps Nipype’s WhiteStripe interface so that its _cmdline (or equivalent) returns a pair (tmpfile, script) where:
The script construction must use the interface inputs:
The produced script must have the exact content (including indentation and newline placement) as used in the tests:
The script content must be exactly: library(neurobase) library(WhiteStripe) in_file = readnii('$in_file') ind = whitestripe(in_file, "$img_type")$$whitestripe.ind norm = whitestripe_norm(in_file, ind) out_file = '$out_file' writenii(norm, out_file)
with the substitutions applied:
Behavior guarantees:
Location and integration:
Acceptance criteria (pass criteria):
Notes and constraints:
Deliverables: