-
Notifications
You must be signed in to change notification settings - Fork 1
/
features.txt
95 lines (69 loc) · 2.29 KB
/
features.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
>>> p = Experiment.Pulling.fromFile('test1')
>>> p.plot()
>>> figure()
>>> FRET.hist(p)
~~~~~~~~~~~
How to make FRET and FEC alignment easier when manipulating data??
When would this be needed?
>>> p.fret.atExt(750)
>>> p.atTime
>>> p.atSep
>>> p.where(p.ext<950)
PullFretData(...) or np.array([]) up to ext 950
>>> p.where(p.ext>750 and p.ext<950).plot()
>>> p.betweenExtension(750,950)
~~~~~~~~~
# Check the quality of a tether
# 0) Validate data is aligned and nothing is missing
# 1) Fit handles to MMS
# 2) Check image if output looks bad => make loading image file easier
# 3) Check fret/donor/acceptor counts are reasonable
# 4) HAIRPIN: verify rips are coincident with fret changes!!
# 1) FITTING
>>> rip_position = p.chooseRip(fig)
>>> fit_limits = p.pickLimits(fig=gcf())
# returns position of rips by extension? index?
# sometimes rips are messy...
>>> rips = p.findRips()
[ 130 ]
# Cluster without fitting? Use log(force) above ~1
>>> p.findRipStates(num='auto', tolerance='auto')
>>> p.fitForceExtension(rips=self.findRips(), ext=750, force=15, start=index1, start=index2)
>>> p.fitForceExtension(mask=np.array(dtype=bool), ...)
[<Fit with params Lc,Lp,F0,K>, <Fit with params Lc,Lp,F0,K,Lc2,Lp2,K2>]
>>> p.ripInfo
[ (ripIndex, ripExt, ripForce, ripSize) ]
>>> p.fitHandles() # fits up to first rip
<Fit with params Lc,Lp,F0,K >
# -OR-
>>> p.fitRips(ext=(),force=()) # ext=750 assumes min, force=20 assumes max
[<Fit with params Lc,Lp,F0,K >, <Fit with params Lc,Lp,F0,K >]
>>> p.fitHandles() # Uses MMS_rip
>>> p.fitRip(x=(992,1020)) # Uses MMS_rip and previous fit results
17.57
>>> p.addRip() # Adds expectation that a new fit will be added
>>> p.fitRip(x=1020) # Uses original handle fit results
10
>>> p.fits
[<Fit ...>, <Fit ...>, <Fit ...>]
>>> p.ripInfo
[ 17.57, 10 ]
# Fit of the upper
>>> p.fit[1]
<Fit with params ...>
p.fitLowerFEC
p.fitUpperFEC
# 2) Loading images
>>> img = p.loadimg() # shorthand for below?
>>> img = Image.fromFile(p.file)
>>> img.show(0)
# LOADING DATA
flist = FileIO.filelist('SJF','s1m1')
FRET.processFiles()
strdata = TrapData.fromFile('test.str')
x,f,sep = strdata[0:10] # array like
strdata.x[0:10]
strdata.near(x=900)
strdata.near(f=15)
strdata.where('x>300') # array like
strdata.fit(x=..., f= ...) # <= constraints are subclassed by _constrainFromLimits