def whichSubs():
	
	from getCueSubjects import getsubs 
	subjects,gi = getsubs()

	print ' '.join(subjects)

	input_subs = raw_input('subject id(s) (hit enter to process all subs): ')
	print '\nyou entered: '+input_subs+'\n'

	if input_subs:
		subjects=input_subs.split(' ')

	return subjects
def whichSubs():
	
	from getCueSubjects import getsubs 
	subjects,gi = getsubs()

	print ' '.join(subjects)

	input_subs = raw_input('subject id(s) (hit enter to process all subs): ')
	print '\nyou entered: '+input_subs+'\n'

	if input_subs:
		subjects=input_subs.split(' ')

	return subjects
Ejemplo n.º 3
0
def whichSubs(base_dir='cueexp'):

    if base_dir == 'cueexp':
        from getCueSubjects import getsubs
        subjects, gi = getsubs()
    elif base_dir == 'cueexp_claudia':
        from getCueSubjects import getsubs_claudia
        subjects, gi = getsubs_claudia()

    print ' '.join(subjects)

    input_subs = raw_input('subject id(s) (hit enter to process all subs): ')
    print '\nyou entered: ' + input_subs + '\n'

    if input_subs:
        subjects = input_subs.split(' ')

    return subjects
Ejemplo n.º 4
0
def whichSubs(base_dir='cueexp'):

	
	if base_dir=='cueexp':
		from getCueSubjects import getsubs 
		subjects,gi = getsubs()
	elif base_dir=='cueexp_claudia':
		from getCueSubjects import getsubs_claudia
		subjects,gi = getsubs_claudia()

	print ' '.join(subjects)

	input_subs = raw_input('subject id(s) (hit enter to process all subs): ')
	print '\nyou entered: '+input_subs+'\n'

	if input_subs:
		subjects=input_subs.split(' ')

	return subjects

##########################################################################################

# make out directory if its not already defined
if not os.path.exists(out_dir):
	os.makedirs(out_dir)

subjects = raw_input('subject id (enter "all" to process all subs): ')
print '\nyou entered: '+subjects+'\n'

subjects=subjects.split(' ')

if subjects[0]=='all':
	from getCueSubjects import getsubs 
	subjects,gi = getsubs('cue')


for subject in subjects:

	print '\n********** GLM FITTING FOR SUBJECT '+subject+' **********\n'

	this_out_str = subject+'_'+out_str

	# define subject-specific directories
	subj_dir = os.path.join(data_dir,subject) # subject dir
	os.chdir(subj_dir) 				 # cd to subj directory
	cdir = os.getcwd()
	print '\nCurrent working directory: '+cdir+'\n\n'
	# NOTE: all input file paths in the 3dDeconvolve command are relative to the subject's directory
	
# sub_labels provides the labels of the volumes to be extracted from the infiles, and 
# corresponding t-stats in outfiles will be named according to out_sub_labels.

import os,sys,re,glob,numpy as np

justPrint = 0 # 1 to just print, 0 to print and execute

# set up study-specific directories and file names, etc.
if os.path.exists('/Volumes/G-DRIVE/cueexp/data'):
	data_dir = '/Volumes/G-DRIVE/cueexp/data'
else: 
	data_dir = os.path.join(os.path.expanduser('~'),'cueexp','data')


from getCueSubjects import getsubs
subjsA,_ = getsubs('cue',1)	# patients
subjsB,_ = getsubs('cue',0) # controls


print(subjsA)
print(subjsB)

#res_dir = os.path.join(data_dir,'results_cue')  # directory containing glm stat files
res_dir = os.path.join(data_dir,'results_cue_afni_imgperiod')  # directory containing glm stat files

out_str = ''
#out_str = '_n35'  # suffix to add to the end of enach out file


# file containing covariate data 
# cv_file = os.path.join(res_dir,'subj_age.txt')  
# Infile names should be in the form of: *_in_str, where * is a 
# specific subject id that will be included in the out file. 

# sub_labels provides the labels of the volumes to be extracted from the infiles, and 
# corresponding t-stats in outfiles will be named according to out_sub_labels.

import os,sys,re,glob


# set up study-specific directories and file names, etc.

data_dir = os.path.join(os.path.expanduser('~'),'cueexp','data')

from getCueSubjects import getsubs
subjsA,_ = getsubs(0)	# controls
subjsB,_ = getsubs(1)   # patients
#subjsB.remove('si151120')


# data_dir = os.path.join(os.path.expanduser('~'),'cueexp_claudia','data')

# from getCueSubjects import getsubs_claudia
# subjects,gi = getsubs_claudia()
# subjsA = subjects
# subjsB=[]

print subjsA
print subjsB

res_dir = os.path.join(data_dir,'results_cueimg_type_ants')  # directory containing glm stat files
Ejemplo n.º 8
0
roi2 = 'Choi_ventralcaudateL'

##########################################################################################

# make out directory if its not already defined
if not os.path.exists(out_dir):
    os.makedirs(out_dir)

subjects = raw_input('subject id (enter "all" to process all subs): ')
print '\nyou entered: ' + subjects + '\n'

subjects = subjects.split(' ')

if subjects[0] == 'all':
    from getCueSubjects import getsubs
    subjects, gi = getsubs('cue')

for subject in subjects:

    print '\n********** GLM FITTING FOR SUBJECT ' + subject + ' **********\n'

    this_out_str = subject + '_' + out_str

    # define subject-specific directories
    subj_dir = os.path.join(data_dir, subject)  # subject dir
    os.chdir(subj_dir)  # cd to subj directory
    cdir = os.getcwd()
    print '\nCurrent working directory: ' + cdir + '\n\n'
    # NOTE: all input file paths in the 3dDeconvolve command are relative to the subject's directory

    #-#-#-#-#-#-#-#-#-#-#-		Run 3dDeconvolve:		-#-#-#-#-#-#-#-#-#-#-#
Ejemplo n.º 9
0
##########################################################################################

# make out directory if its not already defined
if not os.path.exists(out_dir):
	os.makedirs(out_dir)


subjects = raw_input('subject id (enter "all" to process all subs): ')
print '\nyou entered: '+subjects+'\n'

subjects=subjects.split(' ')

if subjects[0]=='all':
	from getCueSubjects import getsubs 
	subjects,gi = getsubs('mid')



for subject in subjects:

	print '\n********** GLM FITTING FOR SUBJECT '+subject+' **********\n'

	this_out_str = subject+'_'+out_str

	# define subject-specific directories
	subj_dir = os.path.join(data_dir,subject) # subject dir
	os.chdir(subj_dir) 				 # cd to subj directory
	cdir = os.getcwd()
	print '\nCurrent working directory: '+cdir+'\n\n'
	# NOTE: all input file paths in the 3dDeconvolve command are relative to the subject's directory
Ejemplo n.º 10
0
#!/usr/bin/python

import os, sys

##################### fit glm using 3dDeconvolve #####################################################################
# EDIT AS NEEDED:

data_dir = os.path.join(os.path.expanduser('~'), 'cueexp', 'data')
from getCueSubjects import getsubs
subjects, gi = getsubs()
#subjects = ['pk160319','jc160320','jc160321']

# data_dir = os.path.join(os.path.expanduser('~'),'cueexp_claudia','data')
# from getCueSubjects import getsubs_claudia
# subjects,gi = getsubs_claudia()

# pre-processed functional data to analyze
func_dir = 'func_proc_cue'  # relative to subject-specific directory
func_files = 'fpsmtcue1_afni+tlrc'
#func_files = 'fpsmtcue1_tlrc.nii'

out_dir = os.path.join(data_dir,
                       'results_cueimg_type_afni')  # directory for out files
#out_dir = os.path.join(data_dir,'results_cueimg_type_ants')  	# directory for out files

csfFName = 'csf1_afni.1D'
wmFName = 'wm1_afni.1D'
#csfFName = 'csf1.1D'
#wmFName = 'wm1.1D'

out_str = 'glm'  # string for output files
Ejemplo n.º 11
0
out_str = 'glm'  # string for output files

##########################################################################################

# make out directory if its not already defined
if not os.path.exists(out_dir):
    os.makedirs(out_dir)

subjects = raw_input('subject id (enter "all" to process all subs): ')
print '\nyou entered: ' + subjects + '\n'

subjects = subjects.split(' ')

if subjects[0] == 'all':
    from getCueSubjects import getsubs
    subjects, gi = getsubs('mid')

for subject in subjects:

    print '\n********** GLM FITTING FOR SUBJECT ' + subject + ' **********\n'

    this_out_str = subject + '_' + out_str

    # define subject-specific directories
    subj_dir = os.path.join(data_dir, subject)  # subject dir
    os.chdir(subj_dir)  # cd to subj directory
    cdir = os.getcwd()
    print '\nCurrent working directory: ' + cdir + '\n\n'
    # NOTE: all input file paths in the 3dDeconvolve command are relative to the subject's directory

    #-#-#-#-#-#-#-#-#-#-#-		Run 3dDeconvolve:		-#-#-#-#-#-#-#-#-#-#-#
Ejemplo n.º 12
0
 #!/usr/bin/python

import os,sys

	
##################### fit glm using 3dDeconvolve #####################################################################
# EDIT AS NEEDED:


data_dir = os.path.join(os.path.expanduser('~'),'cueexp','data')
from getCueSubjects import getsubs 
subjects,gi = getsubs()

# data_dir = os.path.join(os.path.expanduser('~'),'cueexp_claudia','data')
# from getCueSubjects import getsubs_claudia
# subjects,gi = getsubs_claudia()



# pre-processed functional data to analyze
func_dir = 'func_proc_cue'  	# relative to subject-specific directory
func_files = 'fpsmtcue1+tlrc'


out_dir = os.path.join(data_dir,'results_pref')  	# directory for out files 
out_str = 'glm'					# string for output files


##########################################################################################

Ejemplo n.º 13
0
# Infile names should be in the form of: *_in_str, where * is a
# specific subject id that will be included in the out file.

# sub_labels provides the labels of the volumes to be extracted from the infiles, and
# corresponding t-stats in outfiles will be named according to out_sub_labels.

import os, sys, re, glob

# set up study-specific directories and file names, etc.

data_dir = os.path.join(os.path.expanduser('~'), 'cueexp', 'data')

from getCueSubjects import getsubs

subjsA, _ = getsubs(0)  # controls
subjsB, _ = getsubs(1)  # patients
#subjsB.remove('si151120')

# data_dir = os.path.join(os.path.expanduser('~'),'cueexp_claudia','data')

# from getCueSubjects import getsubs_claudia
# subjects,gi = getsubs_claudia()
# subjsA = subjects
# subjsB=[]

print subjsA
print subjsB

res_dir = os.path.join(
    data_dir,
# Infile names should be in the form of: *_in_str, where * is a 
# specific subject id that will be included in the out file. 

# sub_labels provides the labels of the volumes to be extracted from the infiles, and 
# corresponding t-stats in outfiles will be named according to out_sub_labels.

import os,sys,re,glob,numpy as np


# set up study-specific directories and file names, etc.

data_dir = os.path.join(os.path.expanduser('~'),'cueexp','data')

from getCueSubjects import getsubs
subjsA,_ = getsubs('midi',1)	# patients
subjsB,_ = getsubs('midi',0)    # controls


# data_dir = os.path.join(os.path.expanduser('~'),'cueexp_claudia','data')

# from getCueSubjects import getsubs_claudia
# subjects,gi = getsubs_claudia()
# subjsA = subjects
# subjsB=[]

print subjsA
print subjsB

#res_dir = os.path.join(data_dir,'results_midi')  # directory containing glm stat files
res_dir = os.path.join(data_dir,'results_midi_afni')  # directory containing glm stat files
# corresponding t-stats in outfiles will be named according to out_sub_labels.

import os,sys,re,glob,numpy as np

justPrint = 0 # 1 to just print, 0 to print and execute

# set up study-specific directories and file names, etc.
if os.path.exists('/Volumes/G-DRIVE/cueexp/data'):
	data_dir = '/Volumes/G-DRIVE/cueexp/data'
else: 
	data_dir = os.path.join(os.path.expanduser('~'),'cueexp','data')


from getCueSubjects import getsubs
#subjsA,_ = getsubs('cue',1)	# patients
subjsB,_ = getsubs('cue',0) # controls
subjsA=['cd171130','ab171208','tb171209','kk180117','rl180205','jc180212','ct180224','rm180316','cm180506','sh180518','rm180525','dl180602','ap180613','jj180618','lh180622','dr180715','md181018','lh181030','td181116','kd181119','zg181207','lm181213','wa181217']

print(subjsA)
print(subjsB)

#res_dir = os.path.join(data_dir,'results_cue')  # directory containing glm stat files
res_dir = os.path.join(data_dir,'results_cue_afni')  # directory containing glm stat files

out_str = '_sample2'
#out_str = '_n35'  # suffix to add to the end of enach out file


doClustSim = 0 # 1 to do clustsim, otherwise 0 (it takes a while)

Ejemplo n.º 16
0
# sub_labels provides the labels of the volumes to be extracted from the infiles, and 
# corresponding t-stats in outfiles will be named according to out_sub_labels.

import os,sys,re,glob,numpy as np

justPrint = 1 # 1 to just print, 0 to print and execute

# set up study-specific directories and file names, etc.
if os.path.exists('/Volumes/G-DRIVE/cueexp/data'):
	data_dir = '/Volumes/G-DRIVE/cueexp/data'
else: 
	data_dir = os.path.join(os.path.expanduser('~'),'cueexp','data')


from getCueSubjects import getsubs
subjsA,_ = getsubs('cue',1)	# patients
subjsB,_ = getsubs('cue',0) # controls

 
    
### to do age matched control group: 
#subjsB.remove('zl150930')
#subjsB.remove('ps151001')
#subjsB.remove('aa151010')
#subjsB.remove('al151016')
## subjsB.remove('jv151030')
#subjsB.remove('kl160122')
#subjsB.remove('ss160205')
#subjsB.remove('bp160213')
#subjsB.remove('cs160214')
#subjsB.remove('yl160507')