Skip to content

Commit

Permalink
Fix neurosyth download_abstracts example; inc biopython (#753)
Browse files Browse the repository at this point in the history
* DOC: fix neurosyth download_abstracts example; inc biopython

* example 01_*/02: imporrt Bio; not biopython

* comment: Bio from pip install  biopython

* Update examples/01_datasets/02_download_neurosynth.py

Co-authored-by: Taylor Salo <[email protected]>

* typo: install

Co-authored-by: Taylor Salo <[email protected]>
  • Loading branch information
WillForan and tsalo authored Dec 7, 2022
1 parent abb8feb commit c5f18ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/01_datasets/02_download_neurosynth.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
from nimare.extract import download_abstracts, fetch_neuroquery, fetch_neurosynth
from nimare.io import convert_neurosynth_to_dataset

# biopython is unnecessary here, but is required by download_abstracts.
# We import it here only to document the dependency and cause an early failure if it's missing.
import Bio # pip install biopython

###############################################################################
# Download Neurosynth
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -74,7 +78,7 @@
# This is only possible because Neurosynth uses PMIDs as study IDs.
#
# Make sure you replace the example email address with your own.
neurosynth_dset = extract.download_abstracts(neurosynth_dset, "[email protected]")
neurosynth_dset = download_abstracts(neurosynth_dset, "[email protected]")
neurosynth_dset.save(os.path.join(out_dir, "neurosynth_dataset_with_abstracts.pkl.gz"))

###############################################################################
Expand Down

0 comments on commit c5f18ee

Please sign in to comment.