jjb-hub / phd

0 stars 1 forks source link

update main for new file system #63

Open pdeuwaer opened 5 months ago

pdeuwaer commented 5 months ago
  1. DASHBOARD from jasmine updated and brought here: commented to copy
  2. check network() issue on this branch (ALZ glu)
  3. headTwitchHistogram() wont run till nez file system because eeds treatment mapping and applytreatment mapping look in HT folder see issue#57
pdeuwaer commented 5 months ago
#SUBSELECT RAW DATA
# subselectDf(getCompoundAndRatiosDf(filename), {"treatment": "3mg/kgTCB", "compound": "3MT", "region":["SJ", "dH"]}) #EXAMPLE USE

subselectDf(getCompoundAndRatiosDf(filename), {  "compound":["HVA"]})

# CHECK WHICH REGIONS EXIST FOR COMPOUND
subselectDf(getCompoundAndRatiosDf(filename), {  "compound":["5HIAA"]})['region'].unique()

cell above and bellow

#ALZ REGIONS
# 'MO', 'LO', 'M2', 'PL', 'IL', 'aCg', 'pCg', 'S1', 'ENT', 'A', 'DH','VH', 'SH', 'CO', 'VM', 'DM', 'VL', 'DL', 'GP', 'vlT', 'MD', 'HYP', 'CB', 'SN', 'VTA', 'DR', 'MR'

# TCB REGIONS
# "OF","PL","CC", "IC","M", "SJ","SL1", "SL6", "SR6", "SR1", "AC", "V", "Am", "dH", "vH", "NAc", "VM", "DM","VL", "DL", "MD",  "VPL",  "VPR", "DG", "Y",  "SC","SN", "VTA", "DR","MR", "CE"
pdeuwaer commented 5 months ago
# STATS GETTERS / SETTERS

#ALZ REGIONS
# 'MO', 'LO', 'M2', 'PL', 'IL', 'aCg', 'pCg', 'S1', 'ENT', 'A', 'DH','VH', 'SH', 'CO', 'VM', 'DM', 'VL', 'DL', 'GP', 'vlT', 'MD', 'HYP', 'CB', 'SN', 'VTA', 'DR', 'MR'

# TCB REGIONS
# "OF","PL","CC", "IC","M", "SJ","SL1", "SL6", "SR6", "SR1", "AC", "V", "Am", "dH", "vH", "NAc", "VM", "DM","VL", "DL", "MD",  "VPL",  "VPR", "DG", "Y",  "SC","SN", "VTA", "DR","MR", "CE"

#RUN STATS
# if breaks check regions exist using above cell
justStats(filename, 
          experiments=['Alzheimers'], 
          compounds=['DOPAC'], 
          regions=['MO', 'LO', 'M2', 'PL', 'IL', 'aCg', 'S1', 'ENT', 'A', 'DH', 'VH',
                   'SH', 'CO', 'VM', 'DM', 'VL', 'DL', 'GP', 'vlT', 'MD', 'HYP', 'CB',
                    'SN', 'VTA', 'DR', 'MR'], 
        p_value_threshold=0.05)

# QUANTATIVE STATS
subselectDf(getQuantitativeStats(filename), {'experiment':'Alzheimers', 
                                             'is_significant':True, 
                                             'compound':'DOPAC', 
                                        #      'test':'one_way_anova',
                                             'region':[ "MO", "LO", "M2", "PL", "IL", "aCg", "pCg", "S1", "ENT", "A", "DH","VH", "SH", "CO", "VM", "DM", "VL", "DL", "GP", "vlT", "MD", "HYP", "CB", 'SN', 'VTA', 'DR', 'MR' ]})

# AGGERGATED STATS DF
# getAggregateStatsDf(filename)
pdeuwaer commented 5 months ago
#QUANTITATIVE HISTOGRAMS

# WITH PROMPTS - useful for looping over many
quantitativeHistogram(filename)

# MANUELY
quantitativeHistogram( 
    filename,
    p_value_threshold=0.05,
    compound='HVA',
    region='IL',
    experiment= 'Alzheimers', 
    do_outliers=False, 
    from_scratch=True
)

# subselectDf(getCompoundAndRatiosDf(filename), {'compound':'5HIAA/5HT', 'region':'OF', 'experiment':'agonist_antagonist'})
pdeuwaer commented 5 months ago
# QUANTITAIVE SUMMARY --  need to run juststats before

#ALZ REGIONS
# 'MO', 'LO', 'M2', 'PL', 'IL', 'aCg', 'pCg', 'S1', 'ENT', 'A', 'DH','VH', 'SH', 'CO', 'VM', 'DM', 'VL', 'DL', 'GP', 'vlT', 'MD', 'HYP', 'CB', 'SN', 'VTA', 'DR', 'MR'

# TCB REGIONS
# "OF","PL","CC", "IC","M", "SJ","SL1", "SL6", "SR6", "SR1", "AC", "V", "Am", "dH", "vH", "NAc", "VM", "DM","VL", "DL", "MD",  "VPL",  "VPR", "DG", "Y",  "SC","SN", "VTA", "DR","MR", "CE"

quantitativeSummary(
    filename,
    experiment='Alzheimers',
    histogram_type='compound',  #  compound or region
    to_plot='DA',  # chosen compound or region 
    p_value_threshold=0.05,
    columns=["MO","LO","CO", "MR", "DR","VM",  "DM", "IL", "aCg"]  ,
                # "Am", "dH", "vH", "NAc", "VM", "DM","VL", "DL", "MD",  "VPL",  "VPR", 
                # "DG", "Y",  "SC","SN", "VTA", "DR","MR", "CE"], # x values to plot 
    from_scratch=True,
)

next cell has bug on network

#GRAPH THEORY 

#TCB2 REGIONS
#coppy ['DA','NA','5HT','GLU','GABA','ASP','GLY']
#coppy ["OF","PL","CC", "M", "SJ","SL1", "SR1", "AC", "V",  
                        # "Am", "dH", "vH", "NAc", "VM", "DM","VL", "DL", "MD",  "VPL",  "VPR", 
                        # "DG", "Y",  "SC","SN", "VTA", "DR","MR", "CE"]

#ALZ REGIONS
# 'MO', 'LO', 'M2', 'PL', 'IL', 'aCg', 'pCg', 'S1', 'ENT', 'A', 'DH','VH', 'SH', 'CO', 'VM', 'DM', 'VL', 'DL', 'GP', 'vlT', 'MD', 'HYP', 'CB', 'SN', 'VTA', 'DR', 'MR'

network(filename, 
            experiment='Alzheimers', #  dose_response agonist_antagonist
            correlogram_type='compound',
            to_correlate='GLU', 
            p_value_threshold=0.05, 
            n_minimum=5, 
            columns=["MO","LO","M2","IL","aCg","pCg","S1","ENT","A","DH", "VH","SH", "CO", "GP","vlT","HYP","CB"],
            from_scratch=True,
            corr_method='pearson',
            )
pdeuwaer commented 5 months ago

BUG in NETWORK() image

image