Giter Club home page Giter Club logo

cosinorpy's People

Contributors

mmoskon avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

cosinorpy's Issues

Estimating Rhythm Parameters

My understanding is that rhythm parameters are estimated from the beta parameters of a fitted model (by linear regression). It seems you are not doing that evaluate_rhythm_parameters() which is used by fit_me(). Can you please explain?

Understand the results of comparison

Dear developer,

thank you for sharing this nice package. I did not quite understand the results of pair comparison, I would appreciate if you could give me some explanation.

  1. the function: cosinor1.test_cosinor_pairs(df, pairs, period=24)
    It gives me the following result:
  • test | period | p | q | amplitude1 | p(amplitude1) | q(amplitude1) | amplitude2 | p(amplitude2) | q(amplitude2) | d_amplitude | p(d_amplitude) | q(d_amplitude) | CI(d_amplitde) | acrophase1 | p(acrophase1) | q(acrophase1) | acrophase2 | p(acrophase2) | q(acrophase2) | d_acrophase | p(d_acrophase) | q(d_acrophase) | CI(d_acrophase) | CI(d_amplitude)

  • test1 vs. test2 | 24 | 0.12367885 | 0.12367885 | 662.745923 | 0.02351554 | 0.03527331 | 549.744331 | 0.06027629 | 0.06027629 | -113.00159 | 0.78479564 | 0.78479564 |   | 1.85509574 | 2.65E-05 | 2.65E-05 | 3.1400276 | 3.65E-09 | 3.65E-09 | 1.28493186 | 0.06316099 | 0.12632199 | [-0.07049865  2.64036237] | [-924.0725584   698.06937272

I would like to know what are p and q? Is that the significance of the model or the comparison? If q is larger than 0.05 but p is smaller than 0.05, can I still conclude the difference is significant?


  1. the function: cosinor.compare_pairs_limo(df, pairs[1:], n_components = 1, period = 24)
  • test | period | n_components | p | q | p params | q params | p(F test) | q(F test) | d_acrophase | d_amplitude
  • test3 vs. test4 | 24 | 1 | 1.74E-14 | 8.68E-14 | 0.01542093 | 0.02570155 | 0.03391885 | 0.06362089 | 0.1257895 | -585.80176

I would like to know what are p and q here? Are there also p(d_acrophase) and p(d_amplitude) from this function?

Thank you very much,
Fan

Why is the `test` column required?

Thanks for working on this package. I am slightly confused on the usage of the package, as it seems that the test column is required, but I could not find a documentation of its purpose. It looks like it is just for grouping of multiple datasets (but again, I am not sure if I got it correctly). If this is indeed the case, would it be better to make it optional? Thank you for your time.

Upon the use of `test.str.startswith`

Hi,

Really useful package, amazing work, always glad to see others (also) filling research gaps with open-acess code! 💪🏼

As some parts of the documentations were rather ambiguous (I am not that acquainted with cosinor based analysis), I delved in to the code, because after all, the truth lies in the code.

There I remarked that you would often (in over 20 locations) use the df.test.str.startswith mask

df_pop = df[df.test.str.startswith(name)]

However, I think this might possibly introduce unwanted behavior:
e.g.:

Suppose I have two test variables; gene_a & gene_a_CRISPR. The second variable has the same start as the first one, so the startswith mask ; applied on the first variable will also yield true for gene_a_CRISPR.

Please do correct me if I'm wrong,
Kind regards,
Jonas

How to specify a model type while comparing pairs?

I can see cosinor.fit_group() calls cosinor.fit_me() that allows to specify different model types such as possion and NB. If I want to use cosinor.compare_pairs() how can I specify a specific model type?

Sharing one example use case to give more context. For example, there is a measurement y of a subject that is count by nature and is assumed to follow Poisson distribution thereby requiring to use a model with log link and Possion distribution. If I want to test if there is difference in cosinor parameters in weekday vs weekend, how can I achieve this?

Detected Acrophase does match Observations from data

I am using cosinor1.fit_group and cosinor1.fit_cosinor to model timeseries relative abundance data. From my experience the amplitude and intercept values returned fit the data very well but the acrophase and phase of the graph does not align with what is expected from the data. I have attached an image of my code and data with the cosinor modeled function overlaid upon it as an example. The function takes the form y = acos(pi/12x-b)+c where b = (Acrophase value)*pi/12. What could be the reason for the discrepancy?
Thanks!
model

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.