Skip to content

Commit

Permalink
[ENH 🐛] bug fixes in fetch_ahba and v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
saratheriver committed Feb 23, 2021
1 parent 3479f16 commit eb2e31f
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 18 deletions.
1 change: 1 addition & 0 deletions docs/_static/css/saratheriver_nomaxwidth.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

@media screen and (max-width:768px){.tablet-hide{display:none}}
@media screen and (max-width:480px){.mobile-hide{display:none}}

Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
1 change: 1 addition & 0 deletions docs/build/html/_static/css/saratheriver_nomaxwidth.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

@media screen and (max-width:768px){.tablet-hide{display:none}}
@media screen and (max-width:480px){.mobile-hide{display:none}}

Binary file modified docs/build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/pages/01.install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Installation

**ENIGMA TOOLBOX** was tested with MATLAB R2017b.

To install the MATLAB toolbox simply `download <https://github.com/MICA-MNI/ENIGMA/archive/1.0.1.zip>`_
To install the MATLAB toolbox simply `download <https://github.com/MICA-MNI/ENIGMA/archive/1.0.2.zip>`_
and unzip the GitHub toolbox (slow 🐢) or run the following command in your terminal (fast 🐅): ::
git clone https://github.com/MICA-MNI/ENIGMA.git
Expand Down
11 changes: 11 additions & 0 deletions docs/pages/02.whatsnew/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
What's new?
======================================

v1.0.2 (February 23, 2021)
------------------------------------------
Bug fixes in the ``fetch_ahba`` function. Users who wish to use this function (or have used it in a previous version)
must update their **ENIGMA Toolbox** to this release; ``fetch_ahba`` from previous releases will now error.

::

↪ [ENH 🔧] Fix python version mislabeling | @saratheriver
↪ [ENH 🔧] Fix bug and replace stable gene lists | @saratheriver
↪ [DOC 📄] Update documentations | @saratheriver

v1.0.1 (January 11, 2021)
------------------------------------------
Bug fixes and improvement
Expand Down
16 changes: 8 additions & 8 deletions docs/pages/07.epicenter/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ derived from cortical thickness decreases in individuals with left TLE.

.. code-tab:: matlab **Matlab** | meta

% Computing cortical epicenter values (from functional connectivity)
% Identify cortical epicenter values (from functional connectivity)
fc_ctx_epi = zeros(size(fc_ctx, 1), 1);
fc_ctx_epi_p = zeros(size(fc_ctx, 1), 1);
for seed = 1:size(fc_ctx, 1)
Expand All @@ -75,7 +75,7 @@ derived from cortical thickness decreases in individuals with left TLE.
'aparc', 'n_rot', 1000, 'type', 'pearson');
end

% Computing cortical epicenter values (from structural connectivity)
% Identify cortical epicenter values (from structural connectivity)
sc_ctx_epi = zeros(size(sc_ctx, 1), 1);
sc_ctx_epi_p = zeros(size(sc_ctx, 1), 1);
for seed = 1:size(sc_ctx, 1)
Expand Down Expand Up @@ -118,7 +118,7 @@ derived from cortical thickness decreases in individuals with left TLE.

.. code-tab:: matlab **Matlab** | mega

% Computing cortical epicenter values (from functional connectivity)
% Identify cortical epicenter values (from functional connectivity)
fc_ctx_epi = zeros(size(fc_ctx, 1), 1);
fc_ctx_epi_p = zeros(size(fc_ctx, 1), 1);
for seed = 1:size(fc_ctx, 1)
Expand All @@ -129,7 +129,7 @@ derived from cortical thickness decreases in individuals with left TLE.
'parcellation_name', 'aparc', 'n_rot', 1000, 'type', 'pearson');
end

% Computing cortical epicenter values (from structural connectivity)
% Identify cortical epicenter values (from structural connectivity)
sc_ctx_epi = zeros(size(sc_ctx, 1), 1);
sc_ctx_epi_p = zeros(size(sc_ctx, 1), 1);
for seed = 1:size(sc_ctx, 1)
Expand Down Expand Up @@ -232,7 +232,7 @@ derived from cortical thickness decreases in individuals with left TLE.

.. code-tab:: matlab **Matlab** | meta

% Computing subcortical epicenter values (from functional connectivity)
% Identify subcortical epicenter values (from functional connectivity)
fc_sctx_epi = zeros(size(fc_sctx, 1), 1);
fc_sctx_epi_p = zeros(size(fc_sctx, 1), 1);
for seed = 1:size(fc_sctx, 1)
Expand All @@ -243,7 +243,7 @@ derived from cortical thickness decreases in individuals with left TLE.
'aparc', 'n_rot', 1000, 'type', 'pearson');
end

% Computing subcortical epicenter values (from structural connectivity)
% Identify subcortical epicenter values (from structural connectivity)
sc_sctx_epi = zeros(size(sc_sctx, 1), 1);
sc_sctx_epi_p = zeros(size(sc_sctx, 1), 1);
for seed = 1:size(sc_sctx, 1)
Expand Down Expand Up @@ -284,7 +284,7 @@ derived from cortical thickness decreases in individuals with left TLE.

.. code-tab:: matlab **Matlab** | mega

% Computing subcortical epicenter values (from functional connectivity)
% Identify subcortical epicenter values (from functional connectivity)
fc_sctx_epi = zeros(size(fc_sctx, 1), 1);
fc_sctx_epi_p = zeros(size(fc_sctx, 1), 1);
for seed = 1:size(fc_sctx, 1)
Expand All @@ -295,7 +295,7 @@ derived from cortical thickness decreases in individuals with left TLE.
'parcellation_name', 'aparc', 'n_rot', 1000, 'type', 'pearson');
end

% Computing subcortical epicenter values (from structural connectivity)
% Identify subcortical epicenter values (from structural connectivity)
sc_sctx_epi = zeros(size(sc_sctx, 1), 1);
sc_sctx_epi_p = zeros(size(sc_sctx, 1), 1);
for seed = 1:size(sc_sctx, 1)
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/10.genemaps/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Following the examples below, we can fetch microarray expression data.

The command ``fetch_ahba()`` fetches a large (~24 MB) microarray dataset from the internet and may thus be
incredibly slow to load if you lack a good connection. But don't you worry: you can download the
relevant file by typing this command in your terminal ``wget https://github.com/saratheriver/enigma-extra/raw/master/ahba/allgenes_stable.csv``
and specifying its path in the ``fetch_ahba()`` function as follows:``fetch_ahba('/path/to/allgenes.csv')``
relevant file by typing this command in your terminal ``wget https://github.com/saratheriver/enigma-extra/raw/master/ahba/allgenes_stable_r0.2.csv``
and specifying its path in the ``fetch_ahba()`` function as follows:``fetch_ahba('/path/to/allgenes_stable_r0.2.csv')``

.. _fetch_genes:

Expand Down
2 changes: 1 addition & 1 deletion enigmatoolbox/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""enigmatoolbox version"""

__version__ = '1.0.1'
__version__ = '1.0.2'
Binary file modified enigmatoolbox/datasets/__pycache__/base.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion enigmatoolbox/datasets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def fetch_ahba(csvfile=None):
Table of gene co-expression data, shape = (82, 15633)
"""
if csvfile is None:
url = 'https://raw.githubusercontent.com/saratheriver/enigma-extra/master/ahba/allgenes_stable20.csv'
url = 'https://raw.githubusercontent.com/saratheriver/enigma-extra/master/ahba/allgenes_stable_r0.2.csv'
return pd.read_csv(url, error_bad_lines=False)
else:
return pd.read_csv(csvfile, error_bad_lines=False)
Expand Down
Binary file modified enigmatoolbox/plotting/__pycache__/colormaps.cpython-37.pyc
Binary file not shown.
37 changes: 36 additions & 1 deletion enigmatoolbox/plotting/colormaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,41 @@
[235, 235, 181, 255],
[253, 174, 97, 255],
[213, 62, 79, 255]], dtype=np.uint8)
fs_colours2 = np.array([[ 0, 0, 0, 255],
[ 25, 100, 40, 255],
[125, 100, 160, 255],
[100, 25, 0, 255],
[220, 20, 100, 255],
[220, 20, 10, 255],
[180, 220, 140, 255],
[220, 60, 220, 255],
[180, 40, 120, 255],
[140, 20, 140, 255],
[ 20, 30, 140, 255],
[ 35, 75, 50, 255],
[225, 140, 140, 255],
[200, 35, 75, 255],
[160, 100, 50, 255],
[ 20, 220, 60, 255],
[ 60, 220, 60, 255],
[220, 180, 140, 255],
[ 20, 100, 50, 255],
[220, 60, 20, 255],
[120, 100, 60, 255],
[220, 20, 20, 255],
[220, 180, 220, 255],
[ 60, 20, 220, 255],
[160, 140, 180, 255],
[ 80, 20, 140, 255],
[ 75, 50, 125, 255],
[ 20, 220, 160, 255],
[ 20, 180, 140, 255],
[140, 220, 220, 255],
[ 80, 160, 20, 255],
[100, 0, 100, 255],
[ 70, 70, 70, 255],
[150, 150, 200, 255],
[255, 192, 32, 255]], dtype=np.uint8)

root_pth = os.path.dirname(__file__)
TealRd_colors = np.loadtxt(os.path.join(root_pth, 'cmaps', 'TealRd.csv'))
Expand All @@ -45,4 +80,4 @@
'GyRd_r': GyRd_r_colors, 'GyBu': GyBu_colors, 'GyBu_r': GyBu_r_colors,
'eco_kos': eco_kos_colors, 'bb_r': bb_r_colors, 'bb_o': bb_o_colors,
'bb_g': bb_g_colors, 'bb_p': bb_p_colors, 'bb_r_r': bb_r_r_colors, 'bb_o_r': bb_o_r_colors,
'bb_g_r': bb_g_r_colors, 'bb_p_r': bb_p_r_colors, 'spec_5': spec_5_colors}
'bb_g_r': bb_g_r_colors, 'bb_p_r': bb_p_r_colors, 'spec_5': spec_5_colors, 'fs': fs_colours2}
2 changes: 1 addition & 1 deletion matlab/scripts/ahba/fetch_ahba.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

if nargin < 1
% Fetch the csv table from github and load it locally | option 1
url = 'https://raw.githubusercontent.com/saratheriver/enigma-extra/master/ahba/allgenes_stable20.csv';
url = 'https://raw.githubusercontent.com/saratheriver/enigma-extra/master/ahba/allgenes_stable_r0.2.csv';
urlwrite(url, '.gtmp.csv');
genes = readtable('.gtmp.csv');

Expand Down
4 changes: 2 additions & 2 deletions matlab/scripts/permutation_testing/spin_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
% map2 (double array) - The other map to be correlated
%
% Name/value pairs:
% Surface name (string, optional) ? Surface name {?fsa5?, ?fsa5_with_sctx?}.
% Use 'fsa5' for Conte69. Default is ?fsa5?.
% Surface name (string, optional) - Surface name {'fsa5', 'fsa5_with_sctx'}.
% Use 'fsa5' for Conte69. Default is 'fsa5'.
% parcellation_name (string, optional) - Parcellation name {'aparc',
% 'aparc_aseg', 'schaefer_100', 'schaefer_200', 'schaefer_300',
% 'schaefer_400', 'schaefer_500', 'schaefer_600', 'schaefer_700',
Expand Down

0 comments on commit eb2e31f

Please sign in to comment.