biosustain / croissance Goto Github PK
View Code? Open in Web Editor NEWTool for estimating growth rates from microbial growth curves
License: Other
Tool for estimating growth rates from microbial growth curves
License: Other
I applied croissance to analyze growth curves of Pseudomonas aeruginosa grown on glycerol and the exponential phases identified by Croissance seem to include lag phases (and gives 0 lag time). I have attached a figure where the identified exponential phases are shown in shaded blue (rank 1st) and shaded green (rank 2nd). You might see that in most cases, the identified exponential phase is extended to the origin of time and thus includes lag phase. Technically, I constrained n0 to be zero and the y axis was plotted on the log scale. Do you think this is an issue and, if it is, what causes it?
using command line interface seems to result in duplicate row as below:
name phase slope intercept N0 SNR rank
A1 0 0.34830052058623445 -2.0915407235239205 26.691788231631115 308.5905617858235 100.0
A1 1 0.34830052058623445 -2.0915407235239205 26.691788231631115 308.5905617858235 100.0
also start and end for phases are missing.
I cannot find a file named example.tsv in the repository, but one is mentioned in the README.rst file. Should the repository contain this example file?
I am facing the following error. Need your guidance
sajjad@sajjad-ThinkStation-P910:~/Downloads$ croissance --figures hhh.tsv
2022-11-28 09:39:48 croissance INFO Reading curves from 'hhh.tsv
2022-11-28 09:39:48 croissance INFO Collected a total of 8 growth curves
2022-11-28 09:39:48 croissance INFO Annotating growth curves using 1 threads
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '0':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '600':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '1200':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '1800':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '2400':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '3000':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '3600':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance ERROR Unhandled exception while annotating '4200':
2022-11-28 09:39:48 croissance ERROR Traceback (most recent call last):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/main.py", line 44, in call
2022-11-28 09:39:48 croissance ERROR name=name,
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 125, in estimate_growth
2022-11-28 09:39:48 croissance ERROR for phase in _find_growth_phases(smooth_series, window=n_hours):
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/init.py", line 186, in _find_growth_phases
2022-11-28 09:39:48 croissance ERROR first_derivative = savitzky_golay(curve, window, 3, deriv=1)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/anaconda3/lib/python3.7/site-packages/croissance/estimation/util.py", line 15, in savitzky_golay
2022-11-28 09:39:48 croissance ERROR index=series.index, data=savgol_filter(series.values, *args, **kwargs)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 335, in savgol_filter
2022-11-28 09:39:48 croissance ERROR coeffs = savgol_coeffs(window_length, polyorder, deriv=deriv, delta=delta)
2022-11-28 09:39:48 croissance ERROR File "/home/sajjad/.local/lib/python3.7/site-packages/scipy/signal/_savitzky_golay.py", line 97, in savgol_coeffs
2022-11-28 09:39:48 croissance ERROR raise ValueError("polyorder must be less than window_length.")
2022-11-28 09:39:48 croissance ERROR ValueError: polyorder must be less than window_length.
2022-11-28 09:39:48 croissance INFO Writing annotated curves to 'hhh.output.tsv'
2022-11-28 09:39:48 croissance INFO Writing PDFs to 'hhh.output.pdf'
2022-11-28 09:39:48 croissance INFO Done ..
would be good to have the plot function easily importable or part of the curve class.
When using process_curve
on notebooks with time given in minutes (all int, if i remember right), I noticed no growth curve/phase can be found. Just converting minutes to hour resolves the issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.