GithubHelp home page GithubHelp logo

biosustain / croissance Goto Github PK

View Code? Open in Web Editor NEW
24.0 7.0 11.0 85 KB

Tool for estimating growth rates from microbial growth curves

License: Other

Python 100.00%
bioinformatics biology growth-curves curve-fitting

croissance's People

Contributors

lyschoening avatar meono avatar mikkelschubert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

croissance's Issues

duplicate rows in results and missing start/end

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.

handling minutes as time unit

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.

Unable to generate figure

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 ..

input1.txt

Identified exponential phases seem to cover lag phase

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?

growth_curve_PA

missing example.tsv file?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.