Code and Data for "Reading reshapes stimulus selectivity in the visual word form area"
The preprint accompanying this repository this available here: https://www.biorxiv.org/content/10.1101/2023.10.04.560764v2
In this repository, we have included the analysis code, as well as summarized data and the results of all statistical analyses performed for the study.
Analysis code
Here we include a brief description of the files within this folder.
summaries.py: code used to generated all summary csvs included with the data folder (eg: task_stim_betas.csv)
statistics.py: code use to run the linear mixed effects analysis and post-hoc t-tests using pymer4
Figures.ipynb: a comprehensive Jupyter notebook showing the code used to generate all figures included in the manuscript.
bayesFactor.R: code used to compute bayes factors for all results using the BayesFactor R package. other R files with the terms "bayesFactor" or "BFs" were also used for computing bayes factors for additional analyses.
modelComparison.R: code used to compute the effect of reaction times of single trial beta responses.
convertConnectivity.sh: code for transforming files containing correlation values between subject's native space and fsaverage template space and vice-versa. A similar transformation, but for contrast t-values, was implemented in convertContrast.sh.
loadContrastsForROIs.sh: code to automaitcally load contrasts from the visual category-selective ventral temporal regions for the purpose of defining ROIs. A similar function was served by loadLanguageContrastsForROIs.sh, but for the language localizer.
makeCatLocContrastsFigs.sh: code used to generate standardized pngs of surface brain maps included in the manuscript.
makeEventsTSV.m: code to generate BIDS compatible events.tsv for the dataset
removeduplicates.sh: code to delete non-defaced anatomicals from the open repository accompanying this study
roiconvert.sh: similat to convertContrast.sh, code for transforming ROIs, not whole brain data, from anatomical space to fsaverage space. roiconvert_broca.sh and roiconvert_from_fsaverage.sh served similar functions.
runpydeface.sh: code to generate defaced anatomicals for the purpose of sharing, using pydeface.
slow_fast_trials.R: linear mixed model comparison for correlations between two regions, using whether the response time per trial was slow or fast as a predictor.
sublist.txt: text file containing subject ids for use by multiple bash scripts included in this repository.
Data
csv
This folder contains summary files used for statistics and plotting figures, as well as outputs of the Bayes Factor computations.
bayesFactorBetas.csv: bayes factors for all task and stimulus combinations in the experiment
bayesFactorCorrs.csv: bayes factors for all task and stimulus combinations in the experiment, but for the correlations between broca's region and vwfa instead of beta values
behav.csv: summary of the behavioral performance in the experiment
pseudowords.csv, realwords.csv: list of all words and pseudowords used in the experiment
roi.csv: log of which subjects had which ROIs from the localizer experiments.
task_stim_betas.csv: averaged beta values for combinations of task and stimulus for all ROIs in all participants.
task_stim_loc_betas.csv: average beta values for combinations of task, stimulus type and stimulus location for all ROIs in all participants.
trial_level_betas.csv: single trial beta values for all ROIs.
row indices: subject ids.
onset: start time of the trial
trial_type: lists the stimulus type (real word, pseudoword or false font)
taskname: type of task performed in the run (ld: lexical decision, sc: stimulus color detection, fc: fixation color detection)
locationI: stimulus location (1: 3 dva left, 2: center, 3: 3 dva right)
response_time: reaction time for each trial, relative to the onset
respCorrect: 1 indicates correct response was made on a given trial, 0 indicates error
all beta values are in columns corresponding to ROI names.
task_stim_corrs.csv: averaged pairwise correlations using language broca's as seed region for combinations of task and stimulus for all ROIs in all participants.
task_stim_corrs_FOV.csv: averaged pairwise correlations using word form broca's as seed region for combinations of task and stimulus for all ROIs in all participants.
pairwise_roi_broca_vwfa_lh.csv: averaged pairwise correlations between broca's region and vwfa, by task and stimulus, but computed after averaging all the nodes within the vwfa before computing the correlations.
slow_fast_rt_corrs.csv: similar output to pairwise_roi_broca_vwfa_lh.csv, but also labelling whether trials were characterized as fast or slow compared to the median response time for each condition.
stats
This folder contains statistical outputs for all ROI analyses conducted using pymer4. The parent folder contains ROI specific subfolders with statistical results.