def dcan2fmriprep(dcandir, outdir, sub_id=None):
    dcandir = os.path.abspath(dcandir)
    outdir = os.path.abspath(outdir)
    if (sub_id is None):
        sub_idir = glob.glob((dcandir + '/sub*'))
        sub_id = [os.path.basename(j) for j in sub_idir]
    for j in sub_id:
        dcan2fmriprepx(dcan_dir=dcandir, out_dir=outdir, sub_id=j)
    return sub_id
def dcan2fmriprep(dcandir, outdir, sub_id=None):
    dcandir = os.path.abspath(dcandir)
    outdir = os.path.abspath(outdir)
    if (sub_id is None):
        sub_idir = glob.glob((dcandir + '/sub*'))
        sub_id = [os.path.basename(j) for j in sub_idir]
    for j in sub_id:
        dcan2fmriprepx(dcan_dir=dcandir, out_dir=outdir, sub_id=j)
    return sub_id