Exemplo n.º 1
0
sys.path.append('/Users/lindenmp/Dropbox/Work/ResProjects/NormativeNeuroDev_CrossSec_T1/code/func/')
from proj_environment import set_proj_env
sys.path.append('/Users/lindenmp/Dropbox/Work/git/pyfunc/')
from func import my_get_cmap, run_corr, get_fdr_p, run_pheno_correlations, dependent_corr, get_sys_summary, get_fdr_p_df, get_sys_prop, run_ttest, get_cohend, create_dummy_vars, perc_dev


# In[3]:


train_test_str = 'squeakycleanExclude'
exclude_str = 't1Exclude' # 't1Exclude' 'fsFinalExclude'
parc_str = 'schaefer' # 'schaefer' 'lausanne'
parc_scale = 400 # 200 400 | 60 125
primary_covariate = 'ageAtScan1_Years'
extra_str = ''
parcel_names, parcel_loc, drop_parcels, num_parcels, yeo_idx, yeo_labels = set_proj_env(train_test_str = train_test_str, exclude_str = exclude_str,
                                                                            parc_str = parc_str, parc_scale = parc_scale, extra_str = extra_str)


# In[4]:


os.environ['NORMATIVEDIR']


# In[5]:


outdir = os.path.join(os.environ['NORMATIVEDIR'],'analysis_outputs')
if not os.path.exists(outdir): os.makedirs(outdir)

Exemplo n.º 2
0
sys.path.append(
    '/Users/lindenmp/Dropbox/Work/ResProjects/NormativeNeuroDev_Longitudinal/code/func/'
)
from proj_environment import set_proj_env
from func import mark_outliers, get_cmap, run_corr, get_fdr_p, perc_dev, evd, summarise_network

# In[3]:

exclude_str = 't1Exclude'
parc_str = 'schaefer'
parc_scale = 400
primary_covariate = 'scanageYears'
parcel_names, parcel_loc, drop_parcels, num_parcels, yeo_idx, yeo_labels = set_proj_env(
    exclude_str=exclude_str,
    parc_str=parc_str,
    parc_scale=parc_scale,
    primary_covariate=primary_covariate)

# In[4]:

os.environ['NORMATIVEDIR']

# In[5]:

metrics = ('ct', )
phenos = ('Overall_Psychopathology', 'Mania', 'Depression',
          'Psychosis_Positive', 'Psychosis_NegativeDisorg')

# ## Setup plots
sys.path.append(
    '/Users/lindenmp/Dropbox/Work/ResProjects/NormativeNeuroDev_CrossSec_T1/code/func/'
)
from proj_environment import set_proj_env
sys.path.append('/Users/lindenmp/Dropbox/Work/git/pyfunc/')
from func import my_get_cmap

# In[4]:

train_test_str = 'squeakycleanExclude'
exclude_str = 't1Exclude'  # 't1Exclude' 'fsFinalExclude'
parc_str = 'schaefer'  # 'schaefer' 'lausanne'
parc_scale = 400  # 200 400 | 60 125 250
_ = set_proj_env(train_test_str=train_test_str,
                 exclude_str=exclude_str,
                 parc_str=parc_str,
                 parc_scale=parc_scale)

# ### Setup output directory

# In[5]:

print(os.environ['TRTEDIR'])
if not os.path.exists(os.environ['TRTEDIR']):
    os.makedirs(os.environ['TRTEDIR'])

# # Load in metadata

# In[6]:

# LTN and Health Status
Exemplo n.º 4
0
# Plotting
import seaborn as sns
import matplotlib.pyplot as plt
plt.rcParams['svg.fonttype'] = 'none'

# In[2]:

sys.path.append(
    '/Users/lindenmp/Dropbox/Work/ResProjects/neurodev_long/code/func/')
from proj_environment import set_proj_env
from func import get_synth_cov

# In[3]:

exclude_str = 't1Exclude'
parcel_names, parcel_loc, drop_parcels, num_parcels, yeo_idx, yeo_labels = set_proj_env(
    exclude_str=exclude_str)

# In[4]:

print(os.environ['MODELDIR'])
if not os.path.exists(os.environ['MODELDIR']):
    os.makedirs(os.environ['MODELDIR'])

# ## Load data

# In[5]:

df = pd.read_csv(os.path.join(os.environ['MODELDIR'], 'df_pheno.csv'))
df.set_index(['bblid', 'scanid', 'timepoint'], inplace=True)

df_node = pd.read_csv(os.path.join(os.environ['MODELDIR'], 'df_node_base.csv'))