{"id":13676332,"url":"https://github.com/bids-apps/baracus","last_synced_at":"2026-05-29T00:03:32.840Z","repository":{"id":73504503,"uuid":"93560323","full_name":"bids-apps/baracus","owner":"bids-apps","description":"Predicts brain age, based on data from Freesurfer 5.3","archived":false,"fork":false,"pushed_at":"2026-03-16T09:30:29.000Z","size":110,"stargazers_count":10,"open_issues_count":6,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-03-16T22:19:25.168Z","etag":null,"topics":["bids","bidsapp"],"latest_commit_sha":null,"homepage":"","language":"Python","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-06T20:21:54.000Z","updated_at":"2026-03-16T09:30:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e205f32-7117-462a-8e0d-5cb6babae00a","html_url":"https://github.com/bids-apps/baracus","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/bids-apps/baracus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fbaracus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fbaracus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fbaracus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fbaracus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bids-apps","download_url":"https://codeload.github.com/bids-apps/baracus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fbaracus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33631002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bids","bidsapp"],"created_at":"2024-08-02T13:00:23.028Z","updated_at":"2026-05-29T00:03:32.824Z","avatar_url":"https://github.com/bids-apps.png","language":"Python","funding_links":[],"categories":["BIDS Apps"],"sub_categories":["others"],"readme":"# BARACUS: Brain-Age Regression Analysis and Computation Utility Software\n\n[![CircleCI](https://circleci.com/gh/BIDS-Apps/baracus.svg?style=shield\u0026circle-token=:circle-token)](https://circleci.com/gh/BIDS-Apps/baracus)\n[![DOI](https://zenodo.org/badge/93560323.svg)](https://zenodo.org/badge/latestdoi/93560323)\n\nThis [BIDS App](http://bids-apps.neuroimaging.io/) predicts brain age,\nbased on data from Freesurfer 5.3.\nIt combines data from cortical thickness, cortical surface area, and\nsubcortical information (see Liem et al., 2017).\n\n## Requirements\nYour data has to be organized according to the\n[BIDS standard](http://bids.neuroimaging.io) and each subject needs at\nleast one T1w image.\nIn a first step, BARACUS runs [FreeSurfer's](http://freesurfer.net)\n`recon-all` command and saves the output in `{out_dir}/freesurfer/`\nIf the data has previously been analyzed with FreeSurfer version 5.3.0,\nand BARACUS finds them in `--freesurfer_dir` this step is skipped.\n\n**Important:** if you use previously processed FreeSurfer data\n\n1. the data has to be preprocessed with\nFreesurfer's 5.3.0 installation, not the 5.3.0-HCP installation;\n2. FreeSurfer data needs to be BIDS-formatted, i.e. subject folders\nshould be named *sub-\u003csubject_label\u003e*, (e.g., sub-01, sub-02...)\n\n**Also important:** if you are comparing groups regarding brain-age,\nmake sure that the groups are well matched (e.g. regarding ethnicity;\nsee [here](https://github.com/BIDS-Apps/baracus/issues/10)).\n\n## Acknowledgements\nIf you use BARACUS in your work please cite:\n\n1. Liem et al. (2017),\n1. the [zenodo DOI](https://zenodo.org/badge/latestdoi/93560323)\nof the BARACUS version you used, and\n1. The [FreeSurfer tool](https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferMethodsCitation)\n\nLiem et al. (2017). Predicting brain-age\nfrom multimodal imaging data captures cognitive impairment.\nNeuroimage, 148:179–188,\n[doi: 10.1016/j.neuroimage.2016.11.005](http://www.sciencedirect.com/science/article/pii/S1053811916306103).\n[\\[preprint\\]](http://www.biorxiv.org/content/early/2016/11/07/085506)\n\n\n## Models\n**Liem2016__OCI_norm**: Model trained on subjects that have no\nobjective cognitive impairment (OCI) (*OCI norm* in Liem et al., 2017).\nSample: N = 1166, 566f/600m, age: M = 59.1, SD = 15.2, 20-80y\n\n**Liem2016__full_2samp_training**: Model trained on subjects that have no\nobjective cognitive impairment (OCI) (*full LIFE 2sample training* in Liem et al., 2017).\nSample: N = 2377, 1133f/1244m, age: M=58.4, SD=15.4, 18-83y;\ncontaining data from the LIFE and NKI studies.\n\nModels were trained as part of Liem et al. (2017) and the training code is available\n[here](https://github.com/fliem/LeiCA_LIFE).\n\n## Modes\nIt can be run in **BIDS mode** (recommended) and in in **FILE mode**.\n\nIn BIDS mode the input is a BIDS formatted Freesurfer folder.\n\nIn FILE mode the input is provided as surface and aseg files.\nSurface files need to be sampled to fsaverage4 space,\naseg files extracted via asegstats2table.\n\n\n\n\n## BIDS mode\n### Example\nThese examples demonstrate how to run the `bids/baracus` docker container.\nFor a brief introduction how to run BIDS Apps see\n[this site](http://bids-apps.neuroimaging.io/tutorial/).\nIn the examples `/project/bids_sourcedata` and\n`/project/baracus` are directories on your hard drive, which are mapped\ninto the docker container directories `/data/in` and `/data/out`,\nrespectively, via the `-v` flag.\n\n#### Participants\n\n    docker run -ti --rm \\\n    -v /project/bids_sourcedata/:/data/in \\\n    -v /project/baracus:/data/out \\\n    bids/baracus /data/in /data/out participant \\\n    --license_key \"XX\"\n\n#### Group\n\n    docker run -ti --rm \\\n    -v /project/bids_sourcedata/:/data/in \\\n    -v /project/baracus:/data/out \\\n    bids/baracus /data/in /data/out group \\\n    --license_key \"XX\"\n\n#### Participants with previously processed FreeSurfer data\nIf FreeSurfer data is already available, for example at\n`/project/freesurfer/` running the follwing command will use the\npreviously processed data:\n\n    docker run -ti --rm \\\n    -v /project/bids_sourcedata/:/data/in \\\n    -v /project/freesurfer/:/data/freesurfer \\\n    -v /project/baracus:/data/out \\\n    bids/baracus /data/in /data/out participant \\\n    --license_key \"XX\" --freesurfer_dir /data/freesurfer\n\n### Usage\n\n    usage: run_brain_age_bids.py [-h]\n                                 [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]\n                                 [--freesurfer_dir FREESURFER_DIR]\n                                 [--models {Liem2016__OCI_norm,Liem2016__full_2samp_training} [{Liem2016__OCI_norm,Liem2016__full_2samp_training} ...]]\n                                 --license_key LICENSE_KEY [--n_cpus N_CPUS] [-v]\n                                 bids_dir out_dir {participant,group}\n\n    BARACUS: Brain-Age Regression Analysis and Computation Utility Software. BIDS\n    mode. You specify a BIDS-formatted freesurfer folder as input. All data is\n    extracted automatiacally from that folder.\n\n    positional arguments:\n      bids_dir              The directory with the input dataset formatted\n                            according to the BIDS standard.\n      out_dir               Results are put into {out_dir}/baracus.\n      {participant,group}   Level of the analysis that will be performed.\n                            \"participant\": predicts single subject brain age,\n                            \"group\": collects single subject predictions.\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]\n                            The label of the participant that should be analyzed.\n                            The label corresponds to sub-\u003cparticipant_label\u003e from\n                            the BIDS spec (so it does not include \"sub-\"). If this\n                            parameter is not provided all subjects should be\n                            analyzed. Multiple participants can be specified with\n                            a space separated list.\n      --freesurfer_dir FREESURFER_DIR\n                            Folder with FreeSurfer subjects formatted according to\n                            BIDS standard. If subject's recon-all folder cannot be\n                            found, recon-all will be run. If not specified\n                            freesurfer data will be saved to {out_dir}/freesurfer\n      --models {Liem2016__OCI_norm,Liem2016__full_2samp_training} [{Liem2016__OCI_norm,Liem2016__full_2samp_training} ...]\n      --skip_missing        Flag to skip not segmented subjects\n      --license_key LICENSE_KEY\n                            FreeSurfer license key - letters and numbers after \"*\"\n                            in the email you received after registration. To\n                            register (for free) visit\n                            https://surfer.nmr.mgh.harvard.edu/registration.html\n      --n_cpus N_CPUS       Number of CPUs/cores available to use.\n      -v, --version         show program's version number and exit\n\n\n\n## FILE mode\n### Example\n    docker run -ti --rm \\\n    -v /project/data/:/data/in \\\n    -v /project/out:/data/out \\\n    --entrypoint=run_brain_age_files.py \\\n    bids/baracus /data/out \\\n    --lh_thickness_file /data/in/s01/lh.thickness.mgh \\\n    --rh_thickness_file /data/in/s01/rh.thickness.mgh \\\n    --lh_area_file /data/in/s01/lh.area.mgh \\\n    --rh_area_file /data/in/s01/rh.area.mgh \\\n    --aseg_file /data/in/s01/aseg.txt\n\n\n### Usage\n    usage: run_brain_age_files.py [-h] [--participant_label PARTICIPANT_LABEL]\n                                  [--models {Liem2016__OCI_norm,Liem2016__full_2samp_training} [{Liem2016__OCI_norm,Liem2016__full_2samp_training} ...]]\n                                  --lh_thickness_file LH_THICKNESS_FILE\n                                  --rh_thickness_file RH_THICKNESS_FILE\n                                  --lh_area_file LH_AREA_FILE --rh_area_file\n                                  RH_AREA_FILE --aseg_file ASEG_FILE\n                                  out_dir\n\n    BARACUS: Brain-Age Regression Analysis and Computation Utility Software. Files\n    mode. You specify lh/rh thickness/area + aseg file (with\n    --lh_thickness_file...). Surface files need to be sampled to fsaverage4 space,\n    aseg files extracted via asegstats2table. Only one subject can be specified at\n    a time.\n\n    positional arguments:\n      out_dir               Results are put here.\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --participant_label PARTICIPANT_LABEL\n                            will be written into output files and can be omitted\n      --models {Liem2016__OCI_norm,Liem2016__full_2samp_training} [{Liem2016__OCI_norm,Liem2016__full_2samp_training} ...]\n      --lh_thickness_file LH_THICKNESS_FILE\n      --rh_thickness_file RH_THICKNESS_FILE\n      --lh_area_file LH_AREA_FILE\n      --rh_area_file RH_AREA_FILE\n      --aseg_file ASEG_FILE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbids-apps%2Fbaracus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbids-apps%2Fbaracus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbids-apps%2Fbaracus/lists"}