All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
- Added the
draw_in_bounds
option to the curve plotting so that curves never are plotted outside the data range. Addresses [this issue](#59).
- Don't throw an uninterpretable error if
CurveFits.fitParams
called with no curves, instead just return empty data frame.
- The curve fitting parameters (top, bottom, slope) can now be constrained to a range in addition to being completely free or fixed. This can help with fitting some curves more sensibly (see [this issue](#53)). Specifically:
-
fixtop
andfixbottom
parameters toHillCurve
can be 2-tuples of bounds - addedfixslope
parameter toHillCurve
andCurveFits
- Newconstrain_params_range
notebook tests and documents this functionality. - Add
no_curve_fit_first
argument toHillCurve
to aid debugging/development. - Improvements to metrics for assessing curve fit (see [here](#55 (comment))):
- The coefficient of determination (
r2
) now is one if all points are fit by a straight line, rather than engative infinity. - A root-mean-square-deviation (square root of mean residual) is now calculated as thermsd
attribute ofHillCurve
objects and reported in fit parameter summaries fromCurveFits
.
CurveFits.plotReplicates
no longer fails if too many replicates, but instead recycles colors and markers. To make these combinations unique by default, also added another marker toCBMARKERS
.
- Fix internal bug in
HillCurve
that led to failure to try alternative fitting methods if initial fitting failed as it sometimes does for problematic curves.
- Report whether curve midpoint is in bounds of data (interpolated) or extrapolated, similar to as was already done for icXX:
- Added
HillCurve.midpoint_bound
andHillCurve.midpoint_bound_type
attributes - Report 'midpoint_bound' and 'midpoint_bound_type' inCurveFits.fitParams
- Changes to improve and change way fitting is done. Main conceptual difference is to first fit curves with fixed slope, then re-fit all parameters:
- Add
test_curves.ipynb
example. - Addinit_slope
toHillCurve
andCurveFits
- Addfix_slope_first
toHillCurve
andCurveFits
and make it True by default. - Add calculation of coefficient of determination for fits (R2) to quantify how well curve fits data:
- Add
HillCurve.r2
attribute. - Report coefficient of determination as "r2" inCurveFits.fitParams
output. - Improve exception handling:
- Add
HillCurveFittingError
, and when fitting fails raise this exception rather thanRuntimeError
as was done previously. - Improve error messages for some exceptions and change a few exception types. - Add
allow_reps_unequal_conc
toCurveFits
to all serum/virus replicates with different concentrations
- Fixed bug in
CurveFits.combineCurveFits
when using only one fit to combine and specifying one ofsera
,viruses
, orserum_virus_replicates_to_drop
- Added the following parameters to
CurveFits.combineCurveFits
:sera
,viruses
,serum_virus_replicates_to_drop
.
- Added the
CurveFits.combineCurveFits
static method to combine multipleCurveFits
objects.
- Added
attempt_shared_legend
parameter toCurveFits.plotReplicates
to enable plotting many replicates that differ among sera/viruses.
- Added
no_average
option toCurveFits.fitParams
.
- Fixed problem in
fitParams
when only some concentrations have replicates.
- Code format with
black
- Lint with
ruff
- Test with GitHub Actions rather than Travis
- Move examples in docs to notebooks so they can be tested with
nbval
and added to docs withnbsphinx
- Update minimum Python to 3.8 and test on 3.11
- Stop document the "Rachel-style neutralization" and parsing from Excel as these may be deprecated eventually.
- Return standard errors on fit parameters.
- Fixed bug with
orderlegend
inplotGrid
.
- Only import
dmslogo
as needed.
- Fixed reading of Excel
*.xlsx
files.
- Better fitting of difficult curves by trying multiple optimization methods.
- Better error message if virus or serum is NaN.
- CurveFits now works if viruses or sera are categorical.
- Added CurveFits.plotViruses method.
- Bug fix in ylabel plotting.
- Better selection of initial fit parameters when infectivity_or_neutralized is 'neutralized'.
- infectivity_or_neutralized option to allow fitting of fraction neutralized as well as fraction infectivity.
- scipy deprecation warnings.
- Fixed bug when IC50 is at lower bound.
- Ability to draw vertical lines on neutralization curves (vlines option to CurveFits.plotGrid and CurveFits.plotSera).
- Better fit curves that never reach IC50.
- Fix bug in ymax on some plots generated by CurveFits.
- Fix bug in CurveFits.plotGrid when plotting just wildtype.
- ignore_serum_virus to CurveFits.plotSera.
- Added options to CurveFits.plotGrid to not share x- and y-axis, and to allow different labels.
- Custom titles for CurveFits.plotSera.
- Allow exclusion of specific dilutions from RachelStyle2019 neutralization assays.
- More / better coloring options for CurveFits.plotSera.
- Allow more precise sizing of CurveFits plots.
- Smaller tick mark sizes.
Initial release