Coder Social home page Coder Social logo

bharathananth / comparerhythms Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 5.0 10.98 MB

Approaches to identify Differential Rhythmicity

Home Page: https://bharathananth.github.io/compareRhythms/

License: GNU General Public License v3.0

R 49.81% TeX 50.19%
circadian-rhythms differential-expression-analysis high-throughput-data-analysis r-package rstats

comparerhythms's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

comparerhythms's Issues

Double p-value adjustment in rain

Hello,

It seems like here:

rain_A <- rain::rain(t(expr_A), deltat_A, period,
measure.sequence = measure_sequence_A)
rain_B <- rain::rain(t(expr_B), deltat_B, period,
measure.sequence = measure_sequence_B)

The script is doing double adjustment of p-values coming from rain function. I think rain already does an adjustment.

In umbrellaCirc function in rain

adjusted <- suppressWarnings(mt.rawp2adjp(pvals, 
proc = adjp.method))
best <- adjusted$index[1]
pVal[ind] <- adjusted$adjp[1, col.adjp.method]
 if (is.na(pVal[ind])) 
        pVal[ind] <- 1

Cannot install

comparerhythm

This is the issue that our lab has been having across multiple devices when we tried to install this package.

vignette ‘UserGuide’ not found

Hi, I was trying out the package and found I can't open the vignette as suggested in the README.

vignette("UserGuide", package="compareRhythms")
Warning message:
vignetteUserGuidenot found 

It seems install_github() doesn't build manual and vignettes by default. So in order to use vignette(), I need to set build_vignettes = TRUE.

devtools::install_github("bharathananth/compareRhythms", build_vignettes = TRUE)

Error message: exp_design$group is not a factor

I am running compareRhythms on the sample data provided with the package and have gotten to the step where I finally run the compareRhythms function. Up until this point everything has gone smoothly, but now I am getting an error when running the command for voom. I also get the same error when running deseq2 and edger.

Command run:
results1 <- compareRhythms(counts_no_outlier, exp_design_no_outlier, method = "voom") # with default parameters
Error Message:
Error: exp_design$group is not a factor

Do you have a suggestion for how to fix this issue?

Running compareRhythms using a period range?

Hi,
I know you can specify what period you would like to use in compareRhythms() with the default being 24h, but I was wondering if it would allow a period range (i.e. period = 20-28h)? I usually run my data through programs such as JTK with a period range and my worry is that by specifying only one period length, compareRhythms will miss some rhythms.

Issue with RNAseq count table based analysis

Hi,

I have a matrix of raw RNA-seq counts from Salmon loaded using tximport for 2 conditions. I am trying to run the compareRhythms with the following command:

cR_results_c1_c2_deseq <- compareRhythms(cnt.raw.mx.c12, exp_design = exp_design_c12_raw, period = 30, method = "deseq2", just_classify = FALSE)

But I am getting the following error:

Error in if (a && !b && dr) { : missing value where TRUE/FALSE needed

I have checked my counts and they are all positive and none are NAs.

My experimental design table comes from the column names of my samples and the only thing there that may look weird is the use of dashes (-) in my replicate names (specified as rep not as batch), so I am not sure where the issue could lie.

Thanks for any help.

Dani

Unable to Install without DODR

Any idea how to install DODR after its removal from CRAN? Want to try this package out but am having some difficulty installing without the dependency, thanks!

Question about comparing data from two separate RNAseq experiments

Hi,
I would like to use compareRhythms on RNAseq data from two separate RNAseq experiments (on the same tissue, done at different times by two different people) as opposed to something like control vs treated. My ultimate goal would be to determine which genes are circadian in both. I have a few questions about how/whether compareRhythms will work on my data:

  1. Should I use RNAseq counts or TPM values or does it not matter?
  2. Because these two datasets are not from the same experiment, the expression levels (TPM) are different between the two (i.e. TPM_gene1_exp1 = 10 ; TPM_gene1_exp1 = 25). So even though gene1 has the same expression pattern in both datasets and it is circadian in both, will it be deemed different because of the different expression levels thus considered differentially expressed. Would using something like normalized data (z-scores) instead be better or even work at all.

I ran both datasets through compareRhythms and got to the part where I generate the plot and got the attached result. I am not sure how to interpret this.... Because they are completely different experiments I would expect them to be different, but this seems extreme and I'm wondering if it is because of the different TPM levels....

  1. Should both datasets being compared be from the exact same timepoints? Or is it possible to do something like TC1=48h, TC2=72h?

Picture1

Also, I would also like to try to compare some Microarray data to RNAseq data... is this possible at all?

Additional models for "mod_sel" and suggestions for minor improvements

Dear Bharath,

first of all thank you for developing this package. Both vignette and code are clear and it runs all very smoothly and intuitively, plus I really like the idea of the model selection for classifying differences in rhythmic behaviour between two groups.

I have a question on the available models for mod_sel. I attached a plot with different rhythmic behaviour between two groups and in the facet name after the | is the category returned from mod_sel. I am wondering whether one could come up with models to further split the "change" and "same" catgories. For example, the top-right ("baselevelDiff") and bottom-center ("sameExact") curves both end up in the category "same". Would there be a model that captures the difference in base level of "baselevelDiff"? Also, top-left ("antiPhase") and bottom-left ("sameAlmost") are both "change". Is there a model to capture that antiphase behaviour of the top one? I would appreciate any input on this, thanks!

Rplot

Beyond that, if I may give some suggestions for minor improvements:

  1. Currently, the main compareRhythms function hardcodes that rna_seq is FALSE (https://github.com/bharathananth/compareRhythms/blob/master/R/compareRhythms.R#L125) but if you make this an option to choose (TRUE/FALSE) from then one could conveniently use the limma-trend pipeline for RNA-seq data that are already log2 and normalized. That is in fact what I am currently doing, but I had to do some custom changes to the code to make it happen.

  2. I really like that the outlier option is available for voom, but this could also be provided for the standard limma and limma-trend pipeline. It would basically just be running limma::arrayWeights() first and then passing this to limma::lmFit(). Something like:

aw  <- if(outliers) limma::arrayWeights(...) else NULL
fit <- limma::lmFit(..., weights=aw)

Do you think this could make it to the next version? Happy to make a PR if that helps.

Thanks for your time and best wishes,
-Alex

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.