Skip to content

Instantly share code, notes, and snippets.

@akhanf
Created May 3, 2022 16:43
Show Gist options
  • Save akhanf/a30b8130942f4c7dccdafa6832fd1c29 to your computer and use it in GitHub Desktop.
Save akhanf/a30b8130942f4c7dccdafa6832fd1c29 to your computer and use it in GitHub Desktop.
simple snakebids with glob_wildcards
bold: sub-{subject}/ses-{session}/func/sub-{subject}_ses-{session}_task-{task}_bold.nii.gz
mask: derivatives/masks/sub-{subject}/ses-{session}/func/sub-{subject}_ses-{session}_task-{task}_desc-brain_mask.nii.gz
from snakebids.utils.snakemake_io import glob_wildcards
configfile: 'config.yml'
subject,session,task = glob_wildcards(config['bold'])
print(subject)
print(session)
print(task)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment