Skip to content

DEPRECATED - Cookiecutter template for creating a Snakebids BIDS App

License

Notifications You must be signed in to change notification settings

akhanf/snakebids-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

snakebids-app

Cookiecutter template for creating a Snakebids BIDS App

To use this template, follow the instructions below. You do not need to clone this repository.

Creating your new app from this template

Install cookiecutter (if not already installed):

pip install cookiecutter

Use cookiecutter to create the new app based on this template. This will prompt you for details, such as your name, github username, name of the app, etc..

cookiecutter gh:akhanf/snakebids-app

Your app will be found in a new folder, e.g. my_bids_app. Note that you choose the name of the app when you run cookiecutter, but it will be referred to as my_bids_app in this document.

Installing and running your new app

The new workflow has a setup.py and arrives ready to be installed, simply:

cd my_bids_app
pip install -e .

Then you can run the app with:

my_bids_app

Pushing the app to github:

  1. Go to github.com and create a new repository. Make sure you set it Public if you want to use the Documentation feature.

  2. Change directory to your app

cd my_bids_app
  1. Initialize as a git repo and push all the files to main
git init
git add .
git commit -m "initial commit"
git branch -M main
git remote add origin https://github.com/path/to_your/repository.git
git push -u origin main

Documentation

Snakebids apps come pre-packaged with sphinx documentation that can be automatically generated by readthedocs. To set-up your readthedocs website, follow these steps:

  1. Go to https://readthedocs.org/ and create an account (or link to your github account)

  2. Click the Import a Project button

  3. Either click the new repository in the list, or click on Import Manual, and enter in name and url. Enter main as the branch.

  4. Click the Build Latest button to build the documentation. Note: You will get an error if the repository is Private.

Making changes to your workflow:

Snakebids config file

The config file for your new workflow is located here:

my_bids_app/my_bids_app/config/snakebids.yml

You can edit th parse_args dict to add or change the command-line parameters of your app. By default it is set-up as a standard BIDS App. Command-line parameters are passed to the config dict accessible in your snakemake workflow.

You can also edit the pybids_inputs dict to change what BIDS files are grabbed by PyBIDS. These are also modifiable from the command-line with the --filter-<imgtype> options.

Please see the snakebids documentation for more details.

Snakemake workflow

The Snakemake file for the actual workflow is located here:

my_bids_app/my_bids_app/workflow/Snakefile

Here you can add more rules, or include additional snakefiles that define rules. The preamble at the top of the Snakefile is required for snakebids and should not be altered.

Github actions for Test and Deploy

TO DO: add this functionality

About

DEPRECATED - Cookiecutter template for creating a Snakebids BIDS App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published