-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnidm-results_afni.py
39 lines (30 loc) · 1018 Bytes
/
nidm-results_afni.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
"""
Export neuroimaging results created with AFNI.
@author: R. Reynolds/C. Maumet
originally: @author: Camille Maumet <[email protected]>
"""
import sys
import os
from afni_exporter.afni_exporter import AFNItoNIDMExporter
if __name__ == "__main__":
# Remove first argument (script name)
num_args = len(sys.argv)-1
sys.argv.pop(0)
args = sys.argv
usage = "Usage: python nidm-results_afni.py path/to/dataset clustsim"
if num_args != 2:
raise Exception(usage)
dset = args[0]
cset = args[1]
# p_unc = args[2] rcr - add option processing
# p_cor = args[3]
# check for existance given various extensions
#if not os.path.isdir(feat_dir):
# raise Exception("Unknown directory: "+str(feat_dir))
afninidm = AFNItoNIDMExporter(dset=dset, csim_dset=cset,
# p_uncor=p_unc, p_cor=p_cor,
nidm_ver="0.2.0")
afninidm.parse()
export_dir = afninidm.export()
print 'NIDM export available at: '+str(export_dir)