Dlm = {}
for stype in tqdm.tqdm(oldlm.stype.unique()):
    # These two lines may need to be modified based on stype structure
    s = stype.split('-')[0]
    c = stype.split('-')[-1]
    
    # Add sample type dictionary if not already present
    if s not in Dlm.keys():
        Dlm[s] = {}
    
    # Save sample specific landmark data to dictionary
    Dlm[s][c] = oldlm[oldlm.stype==stype]

"""
Explanation: Restructure Data
We will sort landmark data according to stype and organize it in a two tiered dictionary according to sample type (s) and channel (c).
End of explanation
"""


gs = ds.graphSet(tpairs,xarr,tarr)
dtype = 'r'

gs.add_data(
    ds.graphData(Dlm['you']['ZRF'],colors[3]),
    'you','zrf',dtype)
gs.add_data(
    ds.graphData(Dlm['wt']['ZRF'],colors[1]),
    'wt','zrf',dtype)
gs.add_data(
    ds.graphData(Dlm['you']['AT'],colors[2]),
    'you','at',dtype)
gs.add_data(
    ds.graphData(Dlm['wt']['AT'],colors[0]),
    'wt','at',dtype)

gs.make_figure(0.3,'you',figsize=(10,20),P=True,pthresh=0.01)

"""
Explanation: Graphs
End of explanation
"""


