Skip to content

Commit e32f2a2

Browse files
committed
Merge pull request #15 from GreenleafLab/master
sync with sarah
2 parents bfafad3 + 6cc8d37 commit e32f2a2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

bin/findFmaxDist.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,11 @@ def plotDist(vec, bounds):
293293
return
294294

295295

296-
def plotGammaFunction(vec, results=None, params=None, bounds=[0,5]):
296+
def plotGammaFunction(vec, results=None, params=None, bounds=None):
297297
""" Take vector and fit and plot distribution. """
298-
# plot pdf
298+
# plot pdf
299+
if bounds is None:
300+
bounds = np.percentile(vec, [0,100])
299301
plotDist(vec, bounds)
300302
more_x = np.linspace(*bounds, num=100)
301303

bin/singleClusterFits.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ def bindingSeriesByCluster(concentrations, bindingSeries,
172172
if fitParameters is None:
173173
fitParameters = getInitialFitParameters(concentrations)
174174

175-
# change fmin initial
176-
initial_fluorescence = bindingSeries.sort([0]).dropna().iloc[::100, 0]
177-
print "Fitting fmin initial..."
178-
fitParameters.loc['initial', 'fmin'] = findFmaxDist.fitGammaDistribution(
179-
initial_fluorescence, plot=True, set_offset=0).loc['mean']
175+
# change fmin initial
176+
initial_fluorescence = bindingSeries.sort([0]).dropna().iloc[::100, 0]
177+
print "Fitting fmin initial..."
178+
fitParameters.loc['initial', 'fmin'] = findFmaxDist.fitGammaDistribution(
179+
initial_fluorescence, plot=True, set_offset=0).loc['mean']
180180

181181
# sort by fluorescence in null_column to try to get groups of equal
182182
# distributions of binders/nonbinders

0 commit comments

Comments
 (0)