This repository is based on https://github.com/neurospin-projects/2023_jlaval_STSbabies. It aims to use the embeddings of the self-supervised deep learning pipepline to perform folding pattern analysis, especially in relation to genetics.
- python >= 3.6
- numpy >= 1.16.6
- pandas >= 0.23.3
First, the repository can be cloned thanks to:
git clone https://github.com/neurospin-projects/2024_adufournet_sulcus_genetics
cd 2024_adufournet_sulcus_geneticsThen, install a virtual environment through the following command lines:
python3 -m venv venv
. venv/bin/activate
pip3 install --upgrade pip
pip3 install -e .Note that you might need a BrainVISA environment to run some of the functions or notebooks.
You can find the code used for the Anterior Cingulate Cortex genetic analysis in the AD_ACC folder, relying on tools that can be found in the Tools folder.
To use a classifier on the left Anterior Cingulate Cortex (ACC) to detect the ParaCingulate Sulcus (PCS)
The notebook Left_Classifier allows a generalization of the ACC dataset classification to the UKBioBank subjects. Same idea can be found for the right hemisphere at Right_Classifier .
For instance, to compute the average of the sulcal shape given a phenotype with Average, you need the BrainVISA environment. In this example, we work with the number of allele C as the phenotype. The region is the anterior cingulate cortex (CINGULATE.). The hemisphere is the left (L). The subjects ID are in the IID column (IID). The phenotype is in the column projection. The 200-subjects averages will be plot on 2 columns, 1 row.
bv bash
cd notebooks
python3 MOStest/Interpretation/Moving_average.py -p path_to_regression_on_rs4842267_C.csv \
-r CINGULATE. \
-i L \
-s IID \
-e projection \
-n 2 \
-l 1 \
-t 200In a BrainVISA environment (bv bash), use the notebook UKB_crops.ipynb to open subjects' sulcal skeleton.