Skip to content

Commit

Permalink
updated dev gui scripts and new template
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhsmit committed Jul 22, 2020
1 parent e747816 commit f20f543
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/dev_gui_simulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

fpath = os.path.join(directory, 'test_data', 'simulated_data.csv')
data = np_from_txt(fpath, delimiter=',')
data['end'] += 1
uptake = np.zeros_like(data, dtype=float)
data = append_fields(data, 'uptake', data=uptake, usemask=False)
sequence = 'XXXXTPPRILALSAPLTTMMFSASALAPKIXXXXLVIPWINGDKG'
Expand All @@ -29,14 +30,22 @@
nc_start, nc_end = 31, 34 # span of no coverage area (inc, inc)

pmt = PeptideMasterTable(data, drop_first=1, ignore_prolines=True, remove_nan=False)

uptake_corrected = pmt.data['scores'] * pmt.data['ex_residues']
pmt.data = append_fields(pmt.data, ['uptake_corrected'], [uptake_corrected])


states = pmt.groupby_state()
series = states['state1']
series.make_uniform()

kf = KineticsFitting(series, bounds=(1e-2, 800))

ctrl = Controller('template', ['asdf'])
ctrl.series = series

print(ctrl.series.tf_cov)

pickle_names = ['fit_simulated_wt_avg', 'fit_simulated_blocks', 'fit_simulated_rates', 'fit_simulated_pfact']
fit_results = []

Expand Down
18 changes: 18 additions & 0 deletions tests/load_ds1_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from pyhdx.fileIO import read_dynamx
from pyhdx import PeptideMasterTable
import os

directory = os.path.dirname(__file__)
fpath = os.path.join(directory, 'test_data', 'ds1.csv')

data_dir = r'../data'
state = 'PpiANative'
control = ('PpiA-FD', 0.167)

data = read_dynamx(fpath)

pf = PeptideMasterTable(data, drop_first=1, ignore_prolines=True, remove_nan=False)
pf.set_control(control)
states = pf.groupby_state()
series = states[state]
series.make_uniform()

0 comments on commit f20f543

Please sign in to comment.