{"id":13676437,"url":"https://github.com/bids-apps/SPM","last_synced_at":"2025-04-29T07:32:12.934Z","repository":{"id":73504564,"uuid":"64770453","full_name":"bids-apps/SPM","owner":"bids-apps","description":"BIDS App containing an instance of the SPM software.","archived":false,"fork":false,"pushed_at":"2024-11-04T08:31:25.000Z","size":68,"stargazers_count":14,"open_issues_count":11,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-11T18:41:22.547Z","etag":null,"topics":["bids","bidsapp","spm"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/bids/spm/tags","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bids-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2016-08-02T15:47:06.000Z","updated_at":"2024-11-04T08:31:25.000Z","dependencies_parsed_at":"2024-01-14T17:08:19.231Z","dependency_job_id":"781fb689-6e62-44f9-943e-582aa5bb7bc1","html_url":"https://github.com/bids-apps/SPM","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2FSPM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2FSPM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2FSPM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2FSPM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bids-apps","download_url":"https://codeload.github.com/bids-apps/SPM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251455912,"owners_count":21592262,"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":["bids","bidsapp","spm"],"created_at":"2024-08-02T13:00:26.974Z","updated_at":"2025-04-29T07:32:12.676Z","avatar_url":"https://github.com/bids-apps.png","language":"MATLAB","funding_links":[],"categories":["BIDS Apps"],"sub_categories":["others"],"readme":"# SPM BIDS App\n\n## Description\n\n[BIDS App](http://bids-apps.neuroimaging.io/) containing an instance of the [SPM12 software](http://www.fil.ion.ucl.ac.uk/spm/).\n\n## Documentation\n\nExtensive documentation can be found in the [SPM manual](http://www.fil.ion.ucl.ac.uk/spm/doc/manual.pdf).\n\n## Usage\n\nTo launch an instance of the container and analyse some data in BIDS format, type:\n\n```bash\n$ docker run bids/spm bids_dir output_dir level [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]] [--config CFG_FILE]\n```\n\nFor example, to run an analysis in ```participant``` level mode, type:\n\n```bash\n$ docker run -ti --rm \\\n  -v /tmp:/tmp \\\n  -v /var/tmp:/var/tmp \\\n  -v /path/to/local/bids/input/dataset/:/data \\\n  -v /path/to/local/output/:/output \\\n  bids/spm \\\n  /data /output participant --participant_label 01\n```\n\nFor example, to run an analysis in ```group``` level mode with a user-defined pipeline, type:\n\n```bash\n$ docker run -ti --rm \\\n  -v /tmp:/tmp \\\n  -v /var/tmp:/var/tmp \\\n  -v /path/to/local/bids/input/dataset/:/data \\\n  -v /path/to/local/output/:/output \\\n  -v /path/to/local/cfg/:/cfg \\\n  bids/spm \\\n  /data /output group --config /cfg/my_pipeline_group.m\n```\n\nTo build the container, type:\n\n```bash\n$ docker build -t \u003cyourhandle\u003e/spm12 .\n```\n\n### Configuration file\n\nThe configuration file is a MATLAB script detailing the analysis pipeline to be executed. Two struct variables, ```BIDS``` and ```BIDS_App``` are available from within the script, containing details from the command line and the BIDS-formatted dataset. In particular, the ```BIDS``` structure can be queried using the ```spm_BIDS()``` function (see [this](https://en.wikibooks.org/wiki/SPM/BIDS)). The default configuration files for first and second level analyses are ```pipeline_participant.m``` and ```pipeline_group.m```. A template for a single configuration file for all levels could be as follow:\n\n```bash\nif strcmp(BIDS_App.level,'participant')\n    % First level analysis\n\n    % Get T1-weighted image filename for given subject:\n    % a = spm_BIDS(BIDS,'data', 'modality','anat', 'type','T1w');\n    % ...\nelse\n    % Second level analysis\n\n    % The name of the directory containing first level outputs is stored in:\n    % BIDS_App.outdir\n    % ...\nend\n```\n\n## Error Reporting\n\nIf you have a specific problem with the SPM BIDS App, please open an [issue](https://github.com/BIDS-Apps/SPM/issues) on GitHub.\n\nIf your issue concerns SPM more generally, please use the [SPM mailing list](https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=spm).\n\n## Acknowledgement\n\nPlease refer to:\n\n```\n@Book{spm,\n  editor = {K.J. Friston and J. Ashburner and S.J. Kiebel and T.E. Nichols and W.D. Penny},\n  title = {Statistical Parametric Mapping: The Analysis of Functional Brain Images},\n  publisher = {Academic Press},\n  year = {2007},\n  url = {http://store.elsevier.com/product.jsp?isbn=9780123725608}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbids-apps%2FSPM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbids-apps%2FSPM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbids-apps%2FSPM/lists"}