Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paired brains #153

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
42af7d1
Merge branch 'paired-brains' of github.com:WhitakerLab/scona into pai…
Islast Jul 11, 2019
5234b79
add split_groups function
Islast Jul 11, 2019
fe91cfd
add shuffleing to split_groups
Islast Jul 11, 2019
309951a
Add comments
KirstieJane Jul 11, 2019
360e7cf
copy dataframe
Islast Jul 11, 2019
e582376
Fix merge conflicts
KirstieJane Jul 11, 2019
4b1a44c
First commit of tutorial to compare groups
KirstieJane Jul 11, 2019
3091d30
Add comments
KirstieJane Jul 11, 2019
8d72ba5
implement patient grouping at correlation matrix level
Islast Oct 24, 2019
e54952b
unify parsers and install command line tools at setup
Islast Nov 11, 2019
960bc88
structure setup to install command line tools
Islast Nov 11, 2019
0cf0a26
unify parsers and install command line tools at setup
Islast Nov 11, 2019
1952f9e
structure setup to install command line tools
Islast Nov 11, 2019
7b4b8c5
Merge branch 'commandline' of github.com:Islast/scona into commandline
Islast Nov 12, 2019
d3f54eb
add split_groups function
Islast Jul 11, 2019
640983d
add shuffleing to split_groups
Islast Jul 11, 2019
8ddaaea
rebase onto master
Islast Nov 12, 2019
483c527
First commit of tutorial to compare groups
KirstieJane Jul 11, 2019
e27bbf4
implement patient grouping at correlation matrix level
Islast Oct 24, 2019
a731e9d
better syntax for boolean evaluation
Islast Nov 7, 2019
8385d93
Merge branch 'paired-brains' of github.com:Islast/scona into paired-b…
Islast Nov 12, 2019
92a392a
fix syntax error
Islast Nov 12, 2019
a51eff3
Merge branch 'commandline' into paired-brains
Islast Nov 20, 2019
8b251ea
variable renaming
Islast Nov 26, 2019
c2fb702
replace scona.py wrapper
Islast Nov 26, 2019
368c3df
writing out corrmat now optional
Islast Dec 7, 2019
292f8b7
regression test command line tool
Islast Dec 9, 2019
71ec9c9
add split_groups function
Islast Jul 11, 2019
6ffcb6d
add shuffleing to split_groups
Islast Jul 11, 2019
60a8992
Add comments
KirstieJane Jul 11, 2019
34cbad6
copy dataframe
Islast Jul 11, 2019
b1c582b
First commit of tutorial to compare groups
KirstieJane Jul 11, 2019
46e5d0e
Add comments
KirstieJane Jul 11, 2019
d234e07
implement patient grouping at correlation matrix level
Islast Oct 24, 2019
49e6d94
rebase onto master
Islast Nov 12, 2019
b22230e
better syntax for boolean evaluation
Islast Nov 7, 2019
f33389b
fix syntax error
Islast Nov 12, 2019
ae08cbb
Merge branch 'paired-brains' of github.com:Islast/scona into paired-b…
Islast Dec 9, 2019
73686f9
extend command line tools to groupwise matrix construction
Islast Dec 10, 2019
7db7293
extend groupwise analysis methods
Islast Dec 12, 2019
173019b
refactor groupwise analysis into command line tool
Islast Dec 12, 2019
fc19a24
delete obsolete write_fixtures file
Islast Dec 12, 2019
3bab9c7
improve flexibility of analysis pipelines
Islast Dec 12, 2019
78dc552
restore regression testing
Islast Dec 12, 2019
94d4ee1
Update documentation of analyses
Islast Dec 12, 2019
4c2200a
fix parser bugs
Islast Dec 12, 2019
6fe835f
fix issue #136
Islast Dec 12, 2019
e0a166c
implement nodal measures methods for GraphBundle
Islast Dec 13, 2019
1d0cf54
pad random graphs
Islast Dec 13, 2019
3ef382c
hopefully fix travis
Islast Dec 13, 2019
c1e9c0f
fix travis ci
Islast Dec 13, 2019
b8c1761
install scona in ci
Islast Dec 13, 2019
52bee1e
fix travis
Islast Dec 13, 2019
8c1bc8b
debug command line tool
Islast Dec 17, 2019
c71a857
fixture change following change in random graph padding
Islast Dec 17, 2019
245b85d
raise keyerror when fixtures don't exist
Islast Dec 18, 2019
7967cb8
clearer fixture identification
Islast Dec 18, 2019
2390496
specify routines for moving window analysis
Islast Jan 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rebase onto master
  • Loading branch information
Islast committed Dec 9, 2019
commit 49e6d94702407d5cacfdf4f5f59dcd2673f3388b
8 changes: 6 additions & 2 deletions scona/make_corr_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ def split_groups(df, group_var, shuffle=False):
"The group_var argument '{}' does not index a column in this
dataframe.")
split_dict = {}

if shuffle is False:
for value in set(df.loc[:, group_var].values):
split_dict[value] = df.loc[df[group_var] == value, :]
return split_dict

elif shuffle is True:
# if shuffle is true, create a new dataframe, with a new column,
# identical to the group_var column, only randomly permuted.
Expand All @@ -67,7 +68,10 @@ def split_groups(df, group_var, shuffle=False):
df[group_rand] = np.random.permutation(df.loc[:, group_var].values)
for value in set(df.loc[:, group_rand].values):
split_dict[value] = df.loc[df[group_rand] == value, :]
return split_dict
# and clean up by deleting the new column
del df[group_rand]

return split_dict


def create_residuals_df(df, names, covars=[]):
Expand Down