{"id":18143646,"url":"https://github.com/remi-gau/narps_cppl","last_synced_at":"2025-04-06T19:34:02.156Z","repository":{"id":89294593,"uuid":"160351501","full_name":"Remi-Gau/NARPS_CPPL","owner":"Remi-Gau","description":"code for the CPPL participation to NARPS","archived":false,"fork":false,"pushed_at":"2019-10-29T17:57:02.000Z","size":33059,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-13T01:45:20.601Z","etag":null,"topics":["fmri","fmri-data-analysis","fmri-task-based-analysis"],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Remi-Gau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-12-04T12:06:56.000Z","updated_at":"2019-10-29T17:57:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"608ff51e-98e6-40f3-bae0-92e7db73946f","html_url":"https://github.com/Remi-Gau/NARPS_CPPL","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remi-Gau%2FNARPS_CPPL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remi-Gau%2FNARPS_CPPL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remi-Gau%2FNARPS_CPPL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Remi-Gau%2FNARPS_CPPL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Remi-Gau","download_url":"https://codeload.github.com/Remi-Gau/NARPS_CPPL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247540166,"owners_count":20955426,"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":["fmri","fmri-data-analysis","fmri-task-based-analysis"],"created_at":"2024-11-01T19:08:20.757Z","updated_at":"2025-04-06T19:34:02.134Z","avatar_url":"https://github.com/Remi-Gau.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/160351501.svg)](https://zenodo.org/badge/latestdoi/160351501)\n\n# NARPS_CPPL\nCode for the CPPL participation to NARPS\n\nSome of the MRIQC and fMRIprep output was integrated to this repository in the folder `/inputs` to make it standalone.\n\n## Running the analysis\n\nSee further down for more info about docker and containers.\n\nYou can specify to the container where your code and data are when you call it.\n- the folder that will be mapped onto `code` must contain this repository\n- the folder that will be mapped onto `data` must contain the NARPS data (the folder that contains both the BIDS raw dataset and the fMRIprep derivatives)\n- the folder that will be mapped onto `output` can be any folder you wish. The container will simply create a `/derivatives/spm12` folder in it to put the data.\n\nBelow are the commands examples we used to run this analysis\n\n### Start the docker image\nRun the following to start the octave-SPM docker image. The equivalent docker image has been uploaded to [docker hub](https://cloud.docker.com/repository/docker/remigau/cppl-narps/general) for better reproducibility as docker images are not tagged on the SPM docker hub repository.\n\n```\ndocker run -it --rm \\\n--entrypoint /bin/sh \\\n-v /Data/NARPS:/data:ro \\\n-v /Data/NARPS/NARPS_CPPL:/code/ \\\n-v /Data/NARPS:/output \\\nspmcentral/spm:octave-latest\n\n```\n\n\nThis will start octave and move you to the correct directory:\n```\noctave\ncd /code\n```\n\n### Copy and unzipping data\nType in the following command to copy the relevant files and unzip them:\n`step_1_copy_and_unzip_files`\n\n\n### Smoothing the data\nType in the following command to copy the relevant files and unzip them:\n`step_2_smooth_func_files.m`\n\n\n### Running the subject level GLM\nType in the following command to copy the relevant files and unzip them:\n`step_3_run_first_level.m`\n\n\n### Quality control\nSeveral scripts were created to vizualize participants' reactions times, or fMRIprep and MRIQC outputs.\n\nFor example:\n\nAll the `quality_control*.m` scripts.\n\n`make_figures_RT.m` collects subject RT and plots how they are distributed across gain and loss on average at the group level and for each subject. It also checks overall distributions of RT for each subjects and missed responses.\n\n`make_figures_accept_reject.m` collects subject responses (1 = weak accept ; 2 = strong accept ; -1 = weak reject ; -2 = strong reject) and plots how they are distributed across gain and loss on average at the group level and for each subject\n\n\n\n### Running the group level GLM\nType in the following command to copy the relevant files and unzip them:\n`step_4_run_second_level.m`\n\nSubjects kicked out:\n- 56: switched behavioral response\n- 16, 30, 88, 100: too much movement on a single run\n- 18, 22, 110, 116: too much movement overall\n- 31: \"noisy\" anatomical scan\n\nFor the moment, this is hard-coded (don't 8 me!) in the rm_subjects.m function.\n\nThe group level analysis will be found in the `/derivatives/spm12/group/GLM*` folder.\n\nEach group or between group analysis are in different subfolders.\n\nThe following folders contain the relevant group level GLMs:\n- `ttest_gamble_trialxgain_sup_baseline` : positive parametric effect of gain\n- `ttest_gamble_trialxloss_inf_baseline` : negative parametric effect of loss\n- `ttest_gamble_trialxloss_sup_baseline` : positive parametric effect of loss\n\nThere is only one contrast of interest per group analysis.\n\n\n### Making ROIs from neurosynth\nThe script `create_ROIs.m` will create the ROIs used to test each hypothesis.\n\n\n### pTFCE enhancement of the final results.\nEach of the 9 contrasts corresponding to the 9 hypothesis tested were enhanced using the [pTFCE toolbox](https://github.com/spisakt/pTFCE/releases/tag/v0.1.3). This was run on windows 10 with matlab 2018b as we could not incorporate it into the docker.\n\n\n### Final inference\nDisplay the results for each hypothesis using the SPM GUI and the right ROI as inclusive mask to look for any activate voxel. This most likely will require matlab.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremi-gau%2Fnarps_cppl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremi-gau%2Fnarps_cppl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremi-gau%2Fnarps_cppl/lists"}