{"id":13676399,"url":"https://github.com/bids-apps/ndmg","last_synced_at":"2025-04-29T07:32:06.428Z","repository":{"id":73504573,"uuid":"64768018","full_name":"bids-apps/ndmg","owner":"bids-apps","description":"BIDS app for NeuroData's MRI to Graphs pipeline","archived":false,"fork":false,"pushed_at":"2024-11-04T08:34:48.000Z","size":73,"stargazers_count":5,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-11T18:41:14.646Z","etag":null,"topics":["bids","bidsapp","connectomics","diffusion-mri","docker-container","singularity-container"],"latest_commit_sha":null,"homepage":"http://m2g.io","language":"Dockerfile","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:18:55.000Z","updated_at":"2024-11-04T08:34:48.000Z","dependencies_parsed_at":"2024-04-08T22:32:16.786Z","dependency_job_id":"242024de-b992-4bf3-9992-d4ae53079fd9","html_url":"https://github.com/bids-apps/ndmg","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fndmg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fndmg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fndmg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bids-apps%2Fndmg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bids-apps","download_url":"https://codeload.github.com/bids-apps/ndmg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251455889,"owners_count":21592256,"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","connectomics","diffusion-mri","docker-container","singularity-container"],"created_at":"2024-08-02T13:00:25.374Z","updated_at":"2025-04-29T07:32:05.999Z","avatar_url":"https://github.com/bids-apps.png","language":"Dockerfile","readme":"## ndmg\n\nNeuroData’s MR Graphs package, **ndmg** (pronounced “nutmeg”), is the successor of the MRCAP, MIGRAINE, and m2g pipelines. **ndmg** combines dMRI and sMRI data from a single subject to estimate a high-level connectome reliably and scalably.\n\n### Documentation\n\nPlease read the official [**ndmg**](http://m2g.io) docs.\n\n### Error Reporting\n\nExperiencing problems? Please open an [issue](http://github.com/neurodata/ndmg/issues/new) and explain what's happening so we can help.\n\n### Acknowledgement\n\nWhen using this pipeline, please acknowledge us with the citations in the attached [bibtex](https://raw.githubusercontent.com/BIDS-Apps/ndmg/master/ndmg.bib) file.\n\n### Instructions\n\nThe [bids/ndmg](https://hub.docker.com/r/bids/ndmg/) Docker container enables users to run end-to-end connectome estimation on structural MRI right from container launch. The pipeline requires that data be organized in accordance with the [BIDS](http://bids.neuroimaging.io) spec. If the data you wish to process is available on S3 you simply need to provide your s3 credentials at build time and the pipeline will auto-retrieve your data for processing.\n\n\n**To get your container ready to run just follow these steps:**\n\n*(A) I do not wish to use S3*:\n\n- In your terminal, type:\n```{bash}\n$ docker pull bids/ndmg\n```\n\n*(B) I wish to use S3*:\n\n- Add your secret key/access id to a file called `credentials.csv` in this directory on your local machine. A dummy file has been provided to make the format we expect clear. (This is how AWS provides credentials)\n- In your terminal, navigate to this directory and type:\n```{bash}\n$ docker build -t \u003cyourhandle\u003e/ndmg .\n```\n\n\n**Now we're ready to launch our instances and process some data!**\n\nLike a normal docker container, you can startup your container with a single line. Let's assume I am running this and I wish to use S3, so my container is called `gkiar/ndmg`. If you don't want to use S3, you can replace `gkiar` with `bids` and ignore the S3 related flags for the rest of the tutorial.\n\nI can start my container with:\n```{bash}\n$ docker run -ti bids/ndmg\nusage: ndmg_bids [-h]\n                 [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]\n                 [--bucket BUCKET] [--remote_path REMOTE_PATH]\n                 bids_dir output_dir {participant}\nndmg_bids: error: too few arguments\n```\n\nWe should've noticed that I got an error back suggesting that I didn't properly provide information to our container. Let's try again, with the help flag:\n```{bash}\n$ docker run -ti bids/ndmg:v4 -h\n\nusage: ndmg_bids [-h]\n                 [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]\n                 [--bucket BUCKET] [--remote_path REMOTE_PATH]\n                 bids_dir output_dir {participant}\n\nThis is an end-to-end connectome estimation pipeline from sMRI and DTI images\n\npositional arguments:\n  bids_dir              The directory with the input dataset formatted\n                        according to the BIDS standard.\n  output_dir            The directory where the output files should be stored.\n                        If you are running group level analysis this folder\n                        should be prepopulated with the results of the\n                        participant level analysis.\n  {participant}         Level of the analysis that will be performed. Multiple\n                        participant level analyses can be run independently\n                        (in parallel) using the same output_dir.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]\n                        The label(s) of the participant(s) that should be\n                        analyzed. The label corresponds to\n                        sub-\u003cparticipant_label\u003e from the BIDS spec (so it does\n                        not include \"sub-\"). If this parameter is not provided\n                        all subjects should be analyzed. Multiple participants\n                        can be specified with a space separated list.\n  --bucket BUCKET       The name of an S3 bucket which holds BIDS organized\n                        data. You must have built your bucket with credentials\n                        to the S3 bucket you wish to access.\n  --remote_path REMOTE_PATH\n                        The path to the data on your S3 bucket. The data will\n                        be downloaded to the provided bids_dir on your\n                        machine.\n```\n\nCool! That taught us some stuff. So now for the last unintuitive piece of instruction and then just echoing back commands I'm sure you could've figured out from here: in order to share data between our container and the rest of our machine, we need to mount a volume. Docker does this with the `-v` flag. Docker expects its input formatted as: `-v path/to/local/data:/path/in/container`. We'll do this when we launch our container, as well as give it a helpful name so we can locate it later on.\n\nFinally:\n```{bash}\ndocker run -ti --name ndmg_test --rm -v ./data:${HOME}/data bids/ndmg ${HOME}/data/ ${HOME}/data/outputs participant --participant_label 01 -b mybucket -r path/on/bucket/\n```\n","funding_links":[],"categories":["BIDS Apps"],"sub_categories":["others"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbids-apps%2Fndmg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbids-apps%2Fndmg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbids-apps%2Fndmg/lists"}