{"id":23442575,"url":"https://github.com/mvdoc/famface","last_synced_at":"2025-04-13T11:26:42.218Z","repository":{"id":66671873,"uuid":"78216822","full_name":"mvdoc/famface","owner":"mvdoc","description":"Analysis code for \"The neural representation of personally familiar and unfamiliar faces in the distributed system for face perception\" by Visconti di Oleggio Castello, Halchenko, et al., 2017, Scientific Reports","archived":false,"fork":false,"pushed_at":"2018-01-31T22:52:31.000Z","size":16306,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T02:39:07.962Z","etag":null,"topics":["experiment","fmri","mvpa","neuroscience","science"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvdoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-01-06T15:34:51.000Z","updated_at":"2022-12-12T14:46:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebddb35f-9396-44d6-b323-013ebd599b08","html_url":"https://github.com/mvdoc/famface","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdoc%2Ffamface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdoc%2Ffamface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdoc%2Ffamface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdoc%2Ffamface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvdoc","download_url":"https://codeload.github.com/mvdoc/famface/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248704776,"owners_count":21148441,"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":["experiment","fmri","mvpa","neuroscience","science"],"created_at":"2024-12-23T17:32:57.808Z","updated_at":"2025-04-13T11:26:42.212Z","avatar_url":"https://github.com/mvdoc.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Analysis scripts for \"The neural representation of personally familiar and unfamiliar faces in the distributed system for face perception\"\n\nThis repository contains preprocessing and analysis scripts for Visconti di Oleggio Castello, M., Halchenko, Y. O., Guntupalli, J. S., Gors, J. D., \u0026 Gobbini, M. I. (2017). The neural representation of personally familiar and unfamiliar faces in the distributed system for face perception. *Scientific Reports*, 7(1), 12237. https://doi.org/10.1038/s41598-017-12559-1\n\nThe dataset is available through [DataLad](http://datasets.datalad.org/?dir=/labs/gobbini/famface). Once datalad is installed in your system, you can get the data with\n\n```bash\n# install the dataset without downloading any data\ndatalad install -r ///labs/gobbini/famface\n# download the data\ndatalad get famface\n```\n\n**NOTA BENE:** The latest release of this dataset is in BIDS format, however the\nscripts are still configured to run with the old OpenfMRI format. You\ncan checkout the old file structure as follows\n\n```\ncd famface/data\ngit checkout openfmri-v1.0.0\n```\n\n## Setting up the environment\n\nWe recommend using either a [NeuroDebian](http://neuro.debian.net/)\nvirtual machine, or a container (Docker or Singularity) with NeuroDebian\ninstalled to replicate these analyses. In particular, the Python scripts\nmight rely on specific versions of python packages. For example, the\npreprocessing script `fmri_ants_openfmri.py` won't work with newer\nversions of Nipype (\u003e 0.11.0) because of recent refactoring. We kept track of the\nversions of the most important Python packages in the `requirements.txt`\nfile. If you're using conda, you can get started as follows:\n\n```\nconda create --name famface python=2.7\npip install -r requirements.txt\n```\n\nYou should also have FSL and ANTs installed.\n\n### Using the singularity image\n\nWe provide a [Singularity](http://singularity.lbl.gov/) definition file\nthat can be used to build a container with all the necessary packages to\nrun the analyses (except MATLAB--testing in progress with Octave).\n\nOnce Singularity is installed on your system, the image can be built as\nfollows (assuming singularity 2.4.x)\n\n```bash\nsudo singularity build famface.simg Singularity\n```\n\nalternatively, the image can be pulled from Singularity Hub with\n\n```bash\nsingularity pull --name famface.simg shub://mvdoc/famface\n```\n\nInside the container we provide the mountpoints `/data` and `/scripts`,\nso for example one could run the preprocessing for one participant as\nfollows\n\n```bash\nsingularity run -e -c \\\n  -B $PWD:/scripts \\\n  -B /path/to/famface:/data \\\n  famface.simg \\\n  python /scripts/fmri_ants_openfmri.py \\\n     -d /data/data -s sub001 \\\n     --hpfilter 60.0 \\\n     --derivatives \\\n     -o /data/derivatives/output \\\n     -w /data/workdir -p MultiProc\n```\n\nHere we are assuming that `/path/to/famface` is the path to the\n`famface` directory as pulled from datalad, which contains a `data`\ndirectory. Note that all the paths passed to the script need to be relative to \nthe filesystem inside the container.\n\nRunning the following will instead enter the container for interactive\nanalyses:\n\n```bash\nsingularity run -e -c \\\n  -B $PWD:/scripts \\\n  -B /path/to/famface:/data \\\n  famface.simg \n```\n\nPlease note that some paths in the scripts might be hardcoded, so they\nneed to be changed prior to running the scripts.\n\n## Preprocessing and GLM modeling\n\n- [`fmri_ants_openfmri.py`](fmri_ants_openfmri.py): nipype pipeline to\n  perform preprocessing (spatial normalization to MNI 2 mm using ANTs,\nfirst and second level univariate analysis using FSL). Based on the\nexample with the same name from stock Nipype\n- [`pymvpa_hrf.py`](pymvpa_hrf.py): script to run a GLM using PyMVPA and\n  Nipy, to extract betas used for multivariate analysis\n- [`make_unionmask.py`](make_unionmask.py): script to make a union mask\n- [`stack_betas.py`](stack_betas.py): script to stack betas for\n  multivariate analysis\n\n## Analysis\n\n### GLM\n\n- [`group_multregress_openfmri.py`](group_multregress_openfmri.py):\n  nipype pipeline to perform third (group) level univariate analysis\nwith FSL. Based on the pipeline provided by Satra Ghosh and Anne Park\n(our thanks to them!)\n\n### MVPC\n\n- [`run_sl.py`](run_sl.py): main script to run searchlight analyses\n- [`pymvpa2cosmo.py`](pymvpa2cosmo.py): script to convert PyMVPA\n  datasets into CoSMoMVPA datasets for statistical testing using TFCE\n- [`run_tfce_mvdoc_fx.m`](run_tfce_mvdoc_fx.m): script to run TFCE on\n  accuracy maps using CoSMoMVPA\n- [`ev_roi_clf.py`](ev_roi_clf.py): script to run additional decoding analyses in probabilistic masks of early visual areas\n- [`permutation_testing_ev.Rmd`](permutation_testing_ev.Rmd): RMarkdown notebook that plots the results of the analysis in  probabilistic masks of early visual areas (see also pre-computed HTML output [`permutation_testing_ev.nb.html`](permutation_testing_ev.nb.html))\n- [`hmax_decoding_familiarvsunfamiliar.ipynb`](hmax_decoding_familiarvsunfamiliar.ipynb): Jupyter notebook with decoding analysis on features extracted from the HMAX model.\n- [`hmax_familiarvsunfamiliar-id.Rmd`](hmax_familiarvsunfamiliar-id.Rmd): RMarkdown notebook used to analyze the decoding of images using HMAX features (see also pre-computed HTML output [`hmax_familiarvsunfamiliar-id.nb.html`](hmax_familiarvsunfamiliar-id.nb.html))\n\n### Similarity of Representational Geometries\n\n- [`notebooks/define_rois_mds.ipynb`](notebooks/define_rois_mds.ipynb):\n  notebook used to obtain non-overlapping spherical ROIs in both the\ntask data and the movie hyperaligned data\n- [`compute_dsmroi_firstlev.py`](compute_dsmroi_firstlev.py): script to\n  compute first-level cross-validated representational dissimilarity matrices\n- [`notebooks/compute_dsmroi_hpal.ipynb`](notebooks/compute_dsmroi_hpal.ipynb):\n  notebook used to compute the similarity of representational geometries\nusing hyperaligned movie data\n- [`notebooks/plot_mds.ipynb`](notebooks/plot_mds.ipynb):\n  notebook used to generate MDS and circular graph plots for task and\nhyperaligned data\n- [`notebooks/get_between-within_correlations.ipynb`](notebooks/get_between-within_correlations.ipynb):\n  notebook used to obtain dataframes with correlations between/within\nsystems for each subject (task data) or pair of subjects (hyperaligned\ndata)\n- [`mds_betweenwithin_corr.Rmd`](mds_betweenwithin_corr.Rmd): RMarkdown\n  notebook with additional analyses on correlations of RDMS\nbetween/within systems (see rendering in\n[`mds_betweenwithin_corr.nb.html`](mds_betweenwithin_corr.nb.html))\n\n\n## Auxiliary and miscellaneous files\n\n- [`mds_rois.py`](mds_rois.py): contains functions to run MDS analyses\n- [`expdir.py`](expdir.py): to fetch directories used in analyses\n- [`notebooks/scatterplots.ipynb`](notebooks/scatterplots.ipynb): notebook used to plot scatterplots shown in the supplementary material\n\n## Response to Reviewers\n- [response_reviewers_ev.ipynb](notebooks/response_reviewers_ev.ipynb): Is the dorsal stream also close to EV areas?\n- [response_reviewers_modelrsa.ipynb](notebooks/response_reviewers_modelrsa.ipynb): Can we say more about why the representations differ between areas?\n- [response_reviewers_similarity_taskmovie.ipynb](notebooks/response_reviewers_similarity_taskmovie.ipynb): How similar are the second-order representational geometries between the task data and the movie data?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdoc%2Ffamface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvdoc%2Ffamface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdoc%2Ffamface/lists"}