Cosinor Analysis - Beginner

Hello everyone,

I'm new to R and RStudio; I just downloaded it recently to analyze data for my thesis. I need to perform a cosinor analysis, but admittedly, I'm feeling somewhat overwhelmed. I've been familiarizing myself with the RStudio interface, and I have prior coding experience, but I would appreciate some supplementary info. Cosinor is a separate package, correct? Do I need to import both ggplot2 and shiny using the install.packages command before cosinor, or can I just install cosinor right out of the gate? Is there a certain way of performing a cosinor analysis that is most efficient? Thanks in advance - this is all new to me.

Hi zq39,

It may be more helpful if you describe more of the analysis that you're wanting to do? Are you looking to estimate rhythmic parameters (amplitude, acrophase, mesor) or differences in these parameters between groups, or detecting rhythmicity?

(disclaimer: I created circacompare)
There's a package called circacompare that lets you do all of these - I have a vignette (Introduction to circacompare) which describes how to do most things with it. If you want to compare rhythmic characteristics between groups, then you can get away with just using the shiny app and not having to touch any R code (https://rwparsons.shinyapps.io/circacompare/).

1 Like

I believe it would be detecting rhythmicity; I have compiled circadian rhythm data and my advisor recommended that I run a cosinor analysis to evaluate the data for each research subject, and that performing the analysis would return a value that I could use for comparison purposes. That would be the mesor value, correct? The goal of my research is to compare the activity levels in different subjects, so I think using cosinor to take the mesor value would be the best way to accomplish that, but I'm not sure. Would circacompare be best for that, or would shiny be better?

It's still not quite clear to me what you want to get out of your data. You might need to have a chat with your advisor and understand what sort of differences they expect to see in the comparisons.

Mesor is the central oscillating point of the rhythm and reflects the overall abundance of the thing you're measuring - it's usually of least interest compared to changes in amplitude or phase (depending on your context).

If you're looking at the presence of rhythmicity then cosinor and circacompare are not the best tools for the job - JTKcycle is probably the most used tool for this. (there are a whole lot of problems with rhythmicity detection though - this is a worthile read: Methods detecting rhythmic gene expression are biologically relevant only for strong signal)

Yes, I will be sure to speak with my advisor. He told me that I would be able to use the cosinor analysis to return a value based on the cosine that would be representative of the activity levels of each subject, so I will do some more reading about different packages and see what I can find out. Thanks for the help.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.