{"id":13689505,"url":"https://github.com/ReproNim/simple_workflow","last_synced_at":"2025-05-02T00:30:26.154Z","repository":{"id":70236762,"uuid":"61920139","full_name":"ReproNim/simple_workflow","owner":"ReproNim","description":"A very simple, re-executable neuroimaging publication (code)","archived":false,"fork":false,"pushed_at":"2022-02-09T21:53:23.000Z","size":3048,"stargazers_count":8,"open_issues_count":9,"forks_count":42,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-13T11:11:38.539Z","etag":null,"topics":["docker","docker-image","neurodebian","neuroimaging","reproducibility","reproducible-science"],"latest_commit_sha":null,"homepage":"https://f1000research.com/articles/6-124/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReproNim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-25T00:51:51.000Z","updated_at":"2022-03-15T10:33:18.000Z","dependencies_parsed_at":"2023-04-11T12:17:58.028Z","dependency_job_id":null,"html_url":"https://github.com/ReproNim/simple_workflow","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fsimple_workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fsimple_workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fsimple_workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReproNim%2Fsimple_workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReproNim","download_url":"https://codeload.github.com/ReproNim/simple_workflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251966431,"owners_count":21672666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","neurodebian","neuroimaging","reproducibility","reproducible-science"],"created_at":"2024-08-02T15:01:50.617Z","updated_at":"2025-05-02T00:30:26.121Z","avatar_url":"https://github.com/ReproNim.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"**Integration Testing:** [![CircleCI](https://circleci.com/gh/ReproNim/simple_workflow.svg?style=svg)](https://circleci.com/gh/ReproNim/simple_workflow)\n\n**Note:** This demo is intended to run on OS X and GNU/Linux environments, but you can use the Docker container to run on any system you can run Docker or Singularity on.\n\n**Note:** This is the GitHub Repo that accompanies: Ghosh SS, Poline JB, Keator DB et al. A very simple, re-executable neuroimaging publication [version 2; referees: 1 approved, 3 approved with reservations]. F1000Research 2017, 6:124 (doi: 10.12688/f1000research.10783.2)\n\n### Notice for commercial use\n\nThe following non-free Debian packages are part of the Docker container:\n\nnon-free/science        fsl-5.0-core\nnon-free/science        fsl-atlases, fsl-first-data\n\nIf you are considering commercial use of the container please consult the [relevant license](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence).\n\n### Information queried from NITRC-IR and stored in a google spreadsheet\nhttps://docs.google.com/spreadsheets/d/11an55u9t2TAf0EV2pHN0vOd8Ww2Gie-tHp9xGULh_dA\n\n### 1. To execute demo with Docker\n\nFirst download the image\n```bash\ndocker pull repronim/simple_workflow:latest\n```\n\n\u003e ERRATA (9 Feb 2022): The docker image contains an older set of SSL certificate \n\u003e authority certificates. This results in an error when running the command. We\n\u003e can provide the following environmental variable to make container work without\n\u003e rebuilding it. `-e CURL_CA_BUNDLE=''`\n\nNow you can run the image as follows to test on 1 participant's data:\n\n```bash\ndocker run -it --rm -v $PWD/output:/opt/repronim/simple_workflow/scripts/output \\\n   -e CURL_CA_BUNDLE='' repronim/simple_workflow:latest run_demo_workflow.py \\\n   --key 11an55u9t2TAf0EV2pHN0vOd8Ww2Gie-tHp9xGULh_dA -n 1 \ndocker run -it --rm -v $PWD/output:/opt/repronim/simple_workflow/scripts/output \\\n   -e CURL_CA_BUNDLE='' repronim/simple_workflow:latest check_output.py --ignoremissing\n```\n\nYou can extend this to all participants as follows. \n\n```bash\ndocker run -it --rm -v $PWD/output:/opt/repronim/simple_workflow/scripts/output \\\n   -e CURL_CA_BUNDLE='' repronim/simple_workflow:latest run_demo_workflow.py \\\n   --key 11an55u9t2TAf0EV2pHN0vOd8Ww2Gie-tHp9xGULh_dA\ndocker run -it --rm -v $PWD/output:/opt/repronim/simple_workflow/scripts/output \\\n   -e CURL_CA_BUNDLE='' repronim/simple_workflow:latest check_output.py\n```\n\n### 2. To execute demo within your current environment\n\nThe script will check for availability of the following:\n\n1. [FSL](https://fsl.fmrib.ox.ac.uk/)\n2. curl\n3. git or unzip\n\n#### Download the script\n\n```bash\ncurl -Ok https://raw.githubusercontent.com/ReproNim/simple_workflow/3a64f3ffdf174e7c8970de620aa62a9167e3134f/Simple_Prep.sh\n```\n\n#### Setup the environment. \n\nThis will setup a complete environment within a directory\ncalled simple_workflow. It will not add anything to your existing environment. \n\nNote: Because of some limitations with the underlying packages, it may determine \nthat your current working directory path is too long and will ask you to move to \na shorter directory path.\n\n```bash\nbash Simple_Prep.sh\n```\n\n#### Execute a single subject test.\n```bash\nbash Simple_Prep.sh test\n```\n\n#### Run the full demo on all subjects\n\nOption 1:\n```bash\nbash Simple_Prep.sh replay\n```\n\nOption 2: To use the newly created environment\n```bash\ncd simple_workflow/scripts\nexport OLDPATH=$PATH\nexport PATH=$PWD/../miniconda/envs/bh_demo/bin:$PATH\n```\n\nNow you can run the demo script\n```bash\npython run_demo_workflow.py --key 11an55u9t2TAf0EV2pHN0vOd8Ww2Gie-tHp9xGULh_dA\npython check_output.py\n```\n\nTo run on one subject you can do:\n```bash\npython run_demo_workflow.py --key 11an55u9t2TAf0EV2pHN0vOd8Ww2Gie-tHp9xGULh_dA -n 1\n```\n\nTo restore old environment do:\n```bash\nexport PATH=$OLDPATH\nunset OLDPATH\n```\n\n### 3. To build docker image with custom environment\n\nUsing containerization solutions, such as Docker, allows to create\nmultiple complete computation environments while varying versions of any\nanalysis pipeline components or inputs.  You could use [Simple_Prep_docker](Simple_Prep_docker)\nscript to generate environments based on previous [Debian](http://www.debian.org) or [Ubuntu](http://ubuntu.com) releases\nfor which [NeuroDebian](http://neuro.debian.net) builds of FSL [were available in the past](http://snapshot-neuro.debian.net:5002/package/fsl).\n\nN.B.  ATM NeuroDebian snapshots repository is not widely open yet, so if\nyou would like to browse it, please \"knock\" first by running\n`curl -s http://neuro.debian.net/_files/knock-snapshots` command in your shell.\n\n#### Generate an environment\n\nFor the current test data, we generated an environment based on Debian jessie \nrelease with FSL 5.0.9 that was available in April 2017:\n\n```bash\n/Simple_Prep_docker jessie 20170410T000000Z\n```\nwhich will generate a local docker image `repronim:simple_prep_${USER}_jessie_20170410T000000Z`\n(`${USER}` will correspond to your user name), with all necessary for computation\ncomponents installed.\n\nYou can then run the demo using the docker image run commands above by replacing \n`repronim/simple_workflow:latest` with `repronim:simple_prep_${USER}_jessie_20170410T000000Z`\n\n##### Changing the FSL version\n\nYou can also generate an environment based on Debian jessie\nrelease with FSL 5.0.8-3 as it was available in March of 2015 by \nsimply changing the timestamp:\n\n```bash\n./Simple_Prep_docker jessie 20150306T060524Z\n```\n\nwhich will generate a local docker image `repronim:simple_prep_${USER}_jessie_20150306T060524Z`\n(`${USER}` will correspond to your user name), with all necessary for computation\ncomponents installed.\n\nYou can then run the demo using the docker image run commands above by replacing \n`repronim/simple_workflow:latest` with `repronim:simple_prep_${USER}_jessie_20150306T060524Z`\n\n### 4. Other containers\n\nYou can also use [Singularity](http://singularity.lbl.gov/) to run the docker \nimage from DockerHub. The following commands require Singularity v2.4.3 or later.\n\n```bash\nsingularity build repronim.img docker://repronim/simple_workflow:latest\nsingularity run -B $PWD/output:/opt/repronim/simple_workflow/scripts/output -c \\\n  --pwd /opt/repronim/simple_workflow/scripts/ --env CURL_CA_BUNDLE='' repronim.img run_demo_workflow.py \\\n  --key 11an55u9t2TAf0EV2pHN0vOd8Ww2Gie-tHp9xGULh_dA -n 1\nsingularity run -B $PWD/output:/opt/repronim/simple_workflow/scripts/output -c \\\n  --pwd /opt/repronim/simple_workflow/scripts/ --env CURL_CA_BUNDLE='' repronim.img check_output.py --ignoremissing\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReproNim%2Fsimple_workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FReproNim%2Fsimple_workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReproNim%2Fsimple_workflow/lists"}