Neurosynth Coactivation thresholding at FDR p<.001

#1

Hi Neurosynthers!

I am stuck trying to threshold the output from a coactivation analysis in Neurosynth using this code (see below). I’d like to threshold the output (e.g. files where ‘…specificity_z_FDR_0.01.nii.gz’) where FDR <.001 and not .01 which seems to be the default.

network.coactivation(dataset, roi, threshold=0.1, outroot=‘coactivation_from_image’)

Regards, Eunice

#2

It looks like coactivation doesn’t actually do much on its own, so you can replicate it and run the meta-analysis directly, where you’ll have control over q.

Here’s the code for coactivation:

if isinstance(seed, string_types):
    ids = dataset.get_studies(mask=seed, activation_threshold=threshold)
else:
    ids = dataset.get_studies(peaks=seed, r=r, activation_threshold=threshold)

ma = meta.MetaAnalysis(dataset, ids)
ma.save_results(output_dir, prefix)

To fit your code, I believe it would be:

# I don't know if you're using a string or peaks
if isinstance(roi, str):
    ids = dataset.get_studies(mask=roi, activation_threshold=0.1)
else:
    ids = dataset.get_studies(peaks=roi, r=6, activation_threshold=0.1)

ma = meta.MetaAnalysis(dataset, ids)
ma.save_results(output_dir='.', prefix='coactivation_from_image')

MetaAnalysis can take the argument q, so you should be able to do the same thing in your code, but change
ma = meta.MetaAnalysis(dataset, ids)
to
ma = meta.MetaAnalysis(dataset, ids, q=0.001)

I haven’t tested it, but that should work I think.

#3

Dear Tsalo, THANK YOU so much this worked a treat! Most appreciated. Cheers, Eunice

1 Like