{"id":43716394,"url":"https://github.com/khanlab/snakedwi","last_synced_at":"2026-02-05T07:32:57.660Z","repository":{"id":40288575,"uuid":"285615190","full_name":"khanlab/snakedwi","owner":"khanlab","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-02T16:46:44.000Z","size":51809,"stargazers_count":2,"open_issues_count":2,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T05:39:04.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khanlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-06T16:09:46.000Z","updated_at":"2026-02-02T16:48:11.000Z","dependencies_parsed_at":"2023-02-19T15:15:24.965Z","dependency_job_id":null,"html_url":"https://github.com/khanlab/snakedwi","commit_stats":null,"previous_names":["khanlab/snakedwi"],"tags_count":2,"template":false,"template_full_name":"akhanf/snakemake_neuroworkflow","purl":"pkg:github/khanlab/snakedwi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fsnakedwi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fsnakedwi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fsnakedwi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fsnakedwi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khanlab","download_url":"https://codeload.github.com/khanlab/snakedwi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanlab%2Fsnakedwi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29115573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-05T07:32:56.878Z","updated_at":"2026-02-05T07:32:57.645Z","avatar_url":"https://github.com/khanlab.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snakedwi\n\n[![Documentation Status](https://readthedocs.org/projects/snakedwi/badge/?version=latest)](https://snakedwi.readthedocs.io/en/latest/?badge=latest)\n\nBIDS app and Snakemake workflow for diffusion-weighted imaging (DWI) pre-processing.\n\n## Overview\n\nsnakedwi is a comprehensive workflow for preprocessing diffusion MRI data following the BIDS (Brain Imaging Data Structure) standard. The workflow includes:\n\n- **Denoising** - Optional MP-PCA denoising\n- **Susceptibility distortion correction (SDC)** - Multiple methods including TOPUP, SynthSR, SDCFlows, and SynB0\n- **Eddy current correction** - FSL's eddy with optional GPU acceleration and slice-to-volume correction\n- **Brain masking** - Multiple methods including BET, SyN registration, and SynthStrip\n- **Gradient non-linearity correction** - Optional scanner-specific correction\n- **Registration to T1w** - Rigid and deformable registration options\n- **Quality control** - Automatic QC reports with eddy_quad\n\n## Installation\n\n### Prerequisites\n\n- [pixi](https://pixi.sh/) - A fast package manager\n\n### Install with pixi\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/khanlab/snakedwi.git\ncd snakedwi\n```\n\n2. Install dependencies with pixi:\n```bash\npixi install\n```\n\nThis will install snakedwi and all its dependencies in an isolated environment.\n\n## Usage\n\n### Basic Usage\n\nRun the workflow with Apptainer (recommended for using containerized tools):\n\n```bash\npixi run snakedwi /path/to/bids/dir /path/to/output/dir participant --use-apptainer\n```\n\n### Dry Run\n\nTo see what the workflow will do without running it:\n\n```bash\npixi run snakedwi /path/to/bids/dir /path/to/output/dir participant --use-apptainer -np\n```\n\n### Running with Multiple Cores\n\nTo use all available cores:\n\n```bash\npixi run snakedwi /path/to/bids/dir /path/to/output/dir participant --use-apptainer --cores all\n```\n\n### Common Options\n\n- `--use-apptainer`: Use Apptainer/Singularity containers for tool dependencies\n- `--participant_label`: Process specific subject(s), e.g., `--participant_label 001 002`\n- `--sdc_method`: Choose susceptibility distortion correction method (`optimal`, `topup`, `synthsr`, `sdcflow`, `synb0`, `none`)\n- `--masking_method`: Brain masking method (`b0_BET`, `b0_SyN`, `b0_synthstrip`)\n- `--cores`: Number of cores to use (e.g., `--cores 8` or `--cores all`)\n- `-np`: Dry-run mode (show what will be executed without running)\n\n### Example with Options\n\n```bash\npixi run snakedwi /path/to/bids/dir /path/to/output/dir participant \\\n  --use-apptainer \\\n  --participant_label 001 \\\n  --sdc_method topup \\\n  --masking_method b0_synthstrip \\\n  --cores 8\n```\n\n## Input Data Requirements\n\nYour input data must be organized according to the [BIDS specification](https://bids.neuroimaging.io/), specifically:\n\n- DWI data in `sub-*/dwi/` with `.nii.gz` images and corresponding `.json` sidecar files\n- Optional T1w anatomical images in `sub-*/anat/`\n- Metadata including `PhaseEncodingDirection` in JSON files\n\n## Output\n\nProcessed DWI data will be saved in the specified output directory following the BIDS derivatives format, including:\n\n- Preprocessed DWI images\n- Brain masks\n- QC reports\n- Transformation matrices\n- Processing metadata\n\n## Documentation\n\nFor detailed documentation, visit: [https://snakedwi.readthedocs.io](https://snakedwi.readthedocs.io)\n\n## Development\n\n### Running Tests\n\nTo run the test suite:\n\n```bash\npixi run test_all\n```\n\n### Code Formatting\n\nTo format code:\n\n```bash\npixi run quality_fix\n```\n\nTo check code quality:\n\n```bash\npixi run quality_check\n```\n\n## Citation\n\nIf you use snakedwi in your research, please cite:\n\n```\nKhan, A. R. (2024). snakedwi: BIDS app and Snakemake workflow for DWI pre-processing.\nhttps://github.com/khanlab/snakedwi\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- **Issues**: Report bugs or request features at [GitHub Issues](https://github.com/khanlab/snakedwi/issues)\n- **Documentation**: [https://snakedwi.readthedocs.io](https://snakedwi.readthedocs.io)\n- **Repository**: [https://github.com/khanlab/snakedwi](https://github.com/khanlab/snakedwi)\n\n## Acknowledgments\n\nsnakedwi is developed and maintained by the Khan Lab at Western University.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanlab%2Fsnakedwi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhanlab%2Fsnakedwi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanlab%2Fsnakedwi/lists"}