Get absolute path of subject specific directory

nipype

#1

My code looks something like this

    subject_list = [“01”,“02”]
    infosource = Node(IdentityInterface(fields=[“subject_id”]), name=“infosource”)
    infosource.iterables = [(“subject_id”, subject_list)]
    template = {“func”: opj(“sub-{subject_id}”, “func.nii.gz”)}
    wf = Workflow(name=“wf”, base_dir=“/data”)
    ...
    wf.connect(infosource, “subject_id”, select_files, “subject_id”)
    ...

By default nipype will save the output in /data/wf/_subject_id_01/<node>

I would like to place some files in this subject specific directory (ie/data/wf/_subject_id_01). How can I get the absolute path of this directory after its creation?