NiMARE: get_studies_by_label failing

Summary

NameError: name ‘get_studies_by_label’ is not defined

Additional details

  • NiMARE version: 0.0.11
  • python 3.6

What were you trying to do?

Using terms to filter papers and doing a meta-analysis

What did you expect to happen?

Get the ids of the filtered papers

What actually happened?

Function ‘get_studies_by_label’ can not be found, which is given on the website of NiMARE.

Reproducing the bug

# Use neurosynth database
dset = Dataset.load("neurosynth_dataset_with_abstracts.pkl.gz")

#define target variables
ids = get_studies_by_label(labels='(child* | adolescen*) & (trauma* | maltreat* | abuse | advers* | neglect)', label_threshold=0.001)
dset_sel = dset.slice(ids)
print(len(ids))

#do meta-analysis with ALE 
from nimare.meta.cbma.ale import ALE

meta = ALE()
results = meta.fit(dset_sel)

corr = FWECorrector(method="montecarlo", n_cores=8)
cres = corr.transform(results)

plot_stat_map(
    results.get_map("z"),
    cut_coords=[0, 0, -8],
    draw_cross=False,
    cmap="RdBu_r",
    threshold=0.1,
)
plot_stat_map(
    cres.get_map("z_desc-size_level-cluster_corr-FWE_method-montecarlo"),
    cut_coords=[0, 0, -8],
    draw_cross=False,
    cmap="RdBu_r",
    threshold=0.1,
)

I tried to do the same thing on NiMARE as I did on NeuroSynth but it reported errors. If the function ‘get_studies_by_label’ did not work, how could I filter papers by terms?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Thank you for your patience! You solved all my questions! What an amazing man you are!

Using the method of list.intersection,it combines schizophrenia(700+)and childhood (1100+), and gets a total of 44 ids. I’ll give some more information tomorrow to figure out what’s wrong.