Skip to content

mmagnuski/DiamSar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiamSar

code accompanying "No relationship between frontal alpha asymmetry and depressive disorders in a multiverse analysis of five studies" paper (https://elifesciences.org/articles/60595).

Required packages

You need a standard sientific python istallation (Anaconda is recommended) with numpy, scipy, pandas, matplotlib etc. Additional non-standard libraries are:

To plot the figure 1 supplement 1 or summarize channel-pair analyses in a table with effect sizes and their bootstrap confidence intervals you will also need the following packages:

Installation

Currently, the code is used without standard installation process - you just need to download the DiamSar repository, place the folder somewhere on your computer and add that location to the python path. You can either add this location to the PYTHONPATH envirionment variable or add the path through python every time you use DiamSar:

import sys
sys.path.append(r'C:\src\DiamSar')

import DiamSar as ds

Folder structure

DiamSar expects a specific directory stucture that we used throught the analysis. The data should be available on Dryad soon - they contain one zip package for each study. To use DiamSar code you need at least the DiamSar study unzipped somewhere on your computer. However to reproduce the analyses from the paper it is best to download and unzip all three studies. In the end you should have a folder with three subfolders: DiamSar, Wronski and Nowowiejska (these are studies III, II and I, respectively).

Usage example

(more examples will come soon in the form of notebooks)
Once you have the folder structure set up, assuming you have the studies located in C:\data\threetimesno directory, to import and activate DiamSar you need to execute:

import DiamSar as ds
paths = ds.pth.set_paths(base_dir=r'C:\data\threetimesno')

Now the paths variable contains a borsar.project.Paths object that allows to easily get paths and data for any of the three studies. For example you can read BDI scores for the participants for given study in the following way:

bdi = paths.get_data('bdi', study='B')

or read power spectra for given study-space combination:

psd, freq, ch_names, subj_id = paths.get_data('psd', study='C', space='avg')

Now the easiest analysis you can perform is with the deault settings (to learn more see the documentation of DiamSar.analysis.run_analysis):

# run the default analysis
clst = ds.analysis.run_analysis()

# plot the topography of the statistics (t test in this case)
topo = clst.plot(vmin=-2, vmax=2)
# add colorbar
plt.colorbar(topo.img)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages