-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update subtraction ale script and data files #4
Open
62442katieb
wants to merge
6
commits into
NBCLab:master
Choose a base branch
from
62442katieb:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2d2b35f
Merge pull request #1 from NBCLab/master
62442katieb e8f233a
add pure & co-coded coordinate text files
62442katieb b03aa05
use diverging colormaps for subtraction analyses
62442katieb ae005d7
subset dataset, allow pkl files
62442katieb 1e58679
Update README.md
62442katieb 8f675cb
Update nimare-ale-subtraction.py
62442katieb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ results/** | |
*Icon* | ||
testing/** | ||
results_27-08-2020/** | ||
subtractions/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pip install argparse | ||
pip install nilearn | ||
pip install nimare | ||
pip install nibabel | ||
pip install nimare==0.0.3 | ||
pip install nibabel==3.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
import nimare as nim | ||
from nimare.dataset import Dataset | ||
from datetime import date | ||
|
||
today = date.today().strftime('%d_%m_%Y') | ||
|
||
constructs = ['Affiliation', 'Others', 'Self', 'Soc_Comm'] | ||
root_dir = '/Users/kbottenh/Dropbox/Projects/metas/ro-flux' | ||
|
||
all_dat = [f'{root_dir}/data/ALL_Talairach.txt', f'{root_dir}/data/ALL_MNI.txt'] | ||
|
||
all_dset = nim.io.convert_sleuth_to_dataset(all_dat) | ||
|
||
for construct in constructs: | ||
print(construct) | ||
con_dat = [os.path.join(root_dir, 'data', f'{construct}_Pure_Talairach.txt'), | ||
os.path.join(root_dir, 'data', f'{construct}_Pure_MNI.txt')] | ||
|
||
con_dset = nim.io.convert_sleuth_to_dataset(con_dat) | ||
con_dset.save(f'{root_dir}/data/{construct}_all.pkl.gz') | ||
|
||
non_construct_ids = list(set(all_dset.ids) - set(con_dset.ids)) | ||
non_construct_dset = all_dset.slice(non_construct_ids) | ||
|
||
non_construct_dset.save(f'{root_dir}/data/Not_{construct}_all.pkl.gz') | ||
|
||
#non_construct_ids = list(set(tal_dset.ids) - set(tal_construct.ids)) | ||
#tal_non_construct = mni_dset.slice(non_construct_ids) | ||
|
||
#tal_non_construct.save(f'{root_dir}/data/Not_{construct}_Talairach.pkl', compress=False) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason to pin to 0.0.3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should maybe be >= 0.0.3, I think there's a change to the sleuth-to-dset conversion function in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're on 0.0.9rc2 (I think 0.0.9 will be the version for the paper), and there have been improvements to the subtraction analysis method, along with various fixes to a variety of things. We could look through the release history to see if there is anything especially relevant for these analyses.