Git Product home page Git Product logo

simphony's People

Contributors

darwinyfu avatar jakejh avatar jschoenbachler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jschoenbachler

simphony's Issues

Incorrect parameterization for negative binomial

I think there are a couple problems, it should be (double-check against the photo you took of my whiteboard):

stats::rnbinom(length(mu), mu = 2^mu, size = 1/sampleDispersion(mu))

You can verify that this gives the expected variance (mu + disp * mu^2). To be consistent with Polyester, the sampleDispersion function should change accordingly.

https://github.com/hugheylab/SimulatedExpression/blob/6d6cdb5a16b611564b5bd4186a007fbdfb1a60d0/R/simulation.R#L25

Add Time Range Argument to Simphony Call

There should be a new argument to simphony called timeRange, which is a vector of two values. The first is the minimum time to be sampled, and the second is the maximum time to be sampled.

  • If timepointsType is 'auto', the timeRange argument should not be used.
  • The minimum time specified should be the true minimum time for samples created. The maximum time may not be included in the sample time points if the specified interval does not sum to the provided max.

lintr found issues with code

  1. R/internals.R line 63: Compound semicolons are discouraged. Replace them by a newline. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L63)
    makefunc = function(x) {x; function(m) x}   

To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

filename,line_number,message,line
R/internals.R,63,Compound semicolons are discouraged. Replace them by a newline.,makefunc = function(x) {x; function(m) x}
 

Warning, lint_ignore.csv contains lines not found in the current code:
R/accessories.R line 58: Variable and function name style should be camelCase.
r .N = time = mu = base = amp = rhyFunc = phase = period = NULL
R/accessories.R line 119: Variable and function name style should be camelCase.
r abund = .N = mu = sd = dispFunc = NULL
R/internals.R line 7: Variable and function name style should be camelCase.
r group = .N = phase = period = sd = NULL
R/internals.R line 132: Variable and function name style should be camelCase.
r featureGroups = .N = cond = ..cond = feature = NULL

Add elements to DESCRIPTION file

We should consider adding the following lines to the DESCRIPTION file. See the limorhyde or deltaccd repo for comparison and for typical orders (e.g., Imports before Suggests). You can tweak the Depends line, if you're still using R 3.4.something.

Depends: R (>= 3.5.0)
Roxygen: list(markdown = TRUE)
LazyData: true
URL: https://github.com/hugheylab/simphony

It's also important to put a minimum version of each imported and suggested package. I would set the minimum to whatever version you've been using to develop the package.

lintr found issues with code

  1. R/accessories.R line 58: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L58)
    .N = time = mu = base = amp = rhyFunc = phase = period = NULL 
  2. R/accessories.R line 74: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L74)
    for (i in 1:nrow(d)) { 
  3. R/accessories.R line 119: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L119)
    abund = .N = mu = sd = dispFunc = NULL 
  4. R/accessories.R line 228: Avoid 1:length(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L228)
    for (ii in 1:length(cols)) { 
  5. R/internals.R line 7: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L7)
    group = .N = phase = period = sd = NULL 
  6. R/internals.R line 18: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L18)
    for (i in 1:nrow(featureGroups)) { 
  7. R/internals.R line 50: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L50)
    for (i in 1:nrow(featureGroups)) { 
  8. R/internals.R line 103: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L103)
    sm = foreach(cond = 1:nrow(times), .combine = rbind) %do% { 
  9. R/internals.R line 132: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L132)
    featureGroups = .N = cond = ..cond = feature = NULL 
  10. tests/testthat.R line 4: Only use single-quotes. (https://github.com/hugheylab/simphony/blob/master/tests/testthat.R#L4)
    test_check(%22simphony%22) 
  11. tests/testthat/test-functional-simphony.R line 15: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L15)
    expectedAbund = foreach(r = 1:nrow(simData$abundData), .combine = rbind) %do% { 
  12. tests/testthat/test-functional-simphony.R line 47: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L47)
    for(timeNow in unique(simData$sampleMetadata$time)) { 
  13. tests/testthat/test-functional-simphony.R line 50: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L50)
    for(groupNow in unique(simData$featureMetadata$group)) { 
  14. tests/testthat/test-functional-simphony.R line 72: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L72)
    featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12), 
  15. tests/testthat/test-functional-simphony.R line 72: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L72)
    featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12), 
  16. tests/testthat/test-functional-simphony.R line 73: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L73)
    base = function(t) 4 * 2^(-t/12)) 
  17. tests/testthat/test-functional-simphony.R line 73: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L73)
    base = function(t) 4 * 2^(-t/12)) 
  18. vignettes/examples.Rmd line 99: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/vignettes/examples.Rmd#L99)
    featureGroups = data.table(amp =  c(function(tt) 3, function(tt) 3 * 2^(-tt / 24)), 
  19. vignettes/introduction.Rmd line 48: Commas should always have a space after. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L48)
    kable(simData$sampleMetadata[1:3,]) 
  20. vignettes/introduction.Rmd line 112: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L112)
    labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity') 
  21. vignettes/introduction.Rmd line 112: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L112)
    labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity') 

lintr found issues with code

  1. R/accessories.R line 58: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L58)
    .N = time = mu = base = amp = rhyFunc = phase = period = NULL 
  2. R/accessories.R line 74: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L74)
    for (i in 1:nrow(d)) { 
  3. R/accessories.R line 119: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L119)
    abund = .N = mu = sd = dispFunc = NULL 
  4. R/accessories.R line 228: Avoid 1:length(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L228)
    for (ii in 1:length(cols)) { 
  5. R/internals.R line 7: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L7)
    group = .N = phase = period = sd = NULL 
  6. R/internals.R line 18: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L18)
    for (i in 1:nrow(featureGroups)) { 
  7. R/internals.R line 50: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L50)
    for (i in 1:nrow(featureGroups)) { 
  8. R/internals.R line 103: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L103)
    sm = foreach(cond = 1:nrow(times), .combine = rbind) %do% { 
  9. R/internals.R line 132: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L132)
    featureGroups = .N = cond = ..cond = feature = NULL 
  10. tests/testthat.R line 4: Only use single-quotes. (https://github.com/hugheylab/simphony/blob/master/tests/testthat.R#L4)
    test_check("simphony") 
  11. tests/testthat/test-functional-simphony.R line 15: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L15)
    expectedAbund = foreach(r = 1:nrow(simData$abundData), .combine = rbind) %do% { 
  12. tests/testthat/test-functional-simphony.R line 47: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L47)
    for(timeNow in unique(simData$sampleMetadata$time)) { 
  13. tests/testthat/test-functional-simphony.R line 50: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L50)
    for(groupNow in unique(simData$featureMetadata$group)) { 
  14. tests/testthat/test-functional-simphony.R line 72: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L72)
    featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12), 
  15. tests/testthat/test-functional-simphony.R line 72: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L72)
    featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12), 
  16. tests/testthat/test-functional-simphony.R line 73: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L73)
    base = function(t) 4 * 2^(-t/12)) 
  17. tests/testthat/test-functional-simphony.R line 73: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L73)
    base = function(t) 4 * 2^(-t/12)) 
  18. vignettes/examples.Rmd line 99: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/vignettes/examples.Rmd#L99)
    featureGroups = data.table(amp =  c(function(tt) 3, function(tt) 3 * 2^(-tt / 24)), 
  19. vignettes/introduction.Rmd line 48: Commas should always have a space after. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L48)
    kable(simData$sampleMetadata[1:3,]) 
  20. vignettes/introduction.Rmd line 112: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L112)
    labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity') 
  21. vignettes/introduction.Rmd line 112: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L112)
    labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity') 

Rename variables to be agnostic to the type of measurement

Simphony is a general tool for simulating rhythmic data. Simulating gene expression is only one use case. In addition exprData does not mean experiment and is not related to the type of R object called an expression. We'd need to change the code and the documentation.

Suggested changes to variable names:
gene -> feature
expr -> meas (?)

Change Columns in exprGroups

exprGroups should be the main parameter determining the properties of simulated genes.

Columns should include:

  • geneFrac - The fraction of total genes which fall into this group
  • meanExpr - The mean value of expression for genes in this group
  • dExpr - The difference in expression as measured between the two conditions of this group
  • meanAmp - The mean value of the amplitude of the rhythmic component for genes in this group
  • dAmp The difference in amplitude of the rhythmic component as measured for the genes in this group
  • meanPhase - The mean value of the amplitude of the rhythmic component for genes in this group
  • dPhase The difference in phase of the rhythmic component as measured for the genes in this group
  • rhyFunction - The function to sample from for the rhythmic component of a gene
  • period - The period of the rhythmic component for this gene group

lintr found issues with code

  1. R/accessories.R line 58: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L58)
    .N = time = mu = base = amp = rhyFunc = phase = period = NULL   
  2. R/accessories.R line 119: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L119)
    abund = .N = mu = sd = dispFunc = NULL   
  3. R/internals.R line 7: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L7)
    group = .N = phase = period = sd = NULL   
  4. R/internals.R line 132: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L132)
    featureGroups = .N = cond = ..cond = feature = NULL   

To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

filename,line_number,message,line
R/accessories.R,58,Variable and function name style should be camelCase.,.N = time = mu = base = amp = rhyFunc = phase = period = NULL
R/accessories.R,119,Variable and function name style should be camelCase.,abund = .N = mu = sd = dispFunc = NULL
R/internals.R,7,Variable and function name style should be camelCase.,group = .N = phase = period = sd = NULL
R/internals.R,132,Variable and function name style should be camelCase.,featureGroups = .N = cond = ..cond = feature = NULL
 

Remove empirically estimated distribution of rhythm amplitudes

I'm increasingly unconvinced that we've converted the empirically estimated amplitudes to numbers that are appropriate for negative binomial sampling. What got me thinking about it is how much smaller the prediction intervals are for negbinom than for gaussian, for a given amplitude (for typical values of base).

Since we don't even talk about empircal amplitude estimation in the paper, how do you guys feel about simplifying the example in the documentation to something like what we talked about before:

# Simulate data for 100 genes, half non-rhythmic and half rhythmic, with
# amplitudes for rhythmic genes sampled from a log-normal distribution.
nGenes = 100
rhyFrac = 0.5
nRhyGenes = round(rhyFrac * nGenes)
rhyAmps = exp(rnorm(nRhyGenes, mean = 0, sd = 0.25))
fracGenes = c(1 - rhyFrac, rep(rhyFrac / nRhyGenes, nRhyGenes))
exprGroups = data.table(amp = c(0, rhyAmps), fracGenes = fracGenes)
simData = simphony(exprGroups, nGenes = nGenes)

#' # Simulate data for 100 genes, half non-rhythmic and half rhythmic, with

lintr found issues with code

  1. R/accessories.R line 58: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L58)
    .N = time = mu = base = amp = rhyFunc = phase = period = NULL   
  2. R/accessories.R line 74: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L74)
    for (i in 1:nrow(d)) {   
  3. R/accessories.R line 119: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L119)
    abund = .N = mu = sd = dispFunc = NULL   
  4. R/accessories.R line 228: Avoid 1:length(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L228)
    for (ii in 1:length(cols)) {   
  5. R/internals.R line 7: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L7)
    group = .N = phase = period = sd = NULL   
  6. R/internals.R line 18: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L18)
    for (i in 1:nrow(featureGroups)) {   
  7. R/internals.R line 50: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L50)
    for (i in 1:nrow(featureGroups)) {   
  8. R/internals.R line 103: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L103)
    sm = foreach(cond = 1:nrow(times), .combine = rbind) %do% {   
  9. R/internals.R line 132: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L132)
    featureGroups = .N = cond = ..cond = feature = NULL   
  10. tests/testthat.R line 4: Only use single-quotes. (https://github.com/hugheylab/simphony/blob/master/tests/testthat.R#L4)
    test_check("simphony")   
  11. tests/testthat/test-functional-simphony.R line 15: Avoid 1:nrow(...) expressions, use seq_len. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L15)
    expectedAbund = foreach(r = 1:nrow(simData$abundData), .combine = rbind) %do% {   
  12. tests/testthat/test-functional-simphony.R line 47: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L47)
    for(timeNow in unique(simData$sampleMetadata$time)) {   
  13. tests/testthat/test-functional-simphony.R line 50: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L50)
    for(groupNow in unique(simData$featureMetadata$group)) {   
  14. tests/testthat/test-functional-simphony.R line 72: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L72)
    featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12),   
  15. tests/testthat/test-functional-simphony.R line 72: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L72)
    featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12),   
  16. tests/testthat/test-functional-simphony.R line 73: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L73)
    base = function(t) 4 * 2^(-t/12))   
  17. tests/testthat/test-functional-simphony.R line 73: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/tests/testthat/test-functional-simphony.R#L73)
    base = function(t) 4 * 2^(-t/12))   
  18. vignettes/examples.Rmd line 99: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/vignettes/examples.Rmd#L99)
    featureGroups = data.table(amp =  c(function(tt) 3, function(tt) 3 * 2^(-tt / 24)),   
  19. vignettes/introduction.Rmd line 48: Commas should always have a space after. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L48)
    kable(simData$sampleMetadata[1:3,])   
  20. vignettes/introduction.Rmd line 112: Put spaces around all infix operators. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L112)
    labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity')   
  21. vignettes/introduction.Rmd line 112: Place a space before left parenthesis, except in a function call. (https://github.com/hugheylab/simphony/blob/master/vignettes/introduction.Rmd#L112)
    labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity')   

To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

filename,line_number,message,line
R/accessories.R,58,Variable and function name style should be camelCase.,.N = time = mu = base = amp = rhyFunc = phase = period = NULL
R/accessories.R,74,"Avoid 1:nrow(...) expressions, use seq_len.",for (i in 1:nrow(d)) {
R/accessories.R,119,Variable and function name style should be camelCase.,abund = .N = mu = sd = dispFunc = NULL
R/accessories.R,228,"Avoid 1:length(...) expressions, use seq_len.",for (ii in 1:length(cols)) {
R/internals.R,7,Variable and function name style should be camelCase.,group = .N = phase = period = sd = NULL
R/internals.R,18,"Avoid 1:nrow(...) expressions, use seq_len.",for (i in 1:nrow(featureGroups)) {
R/internals.R,50,"Avoid 1:nrow(...) expressions, use seq_len.",for (i in 1:nrow(featureGroups)) {
R/internals.R,103,"Avoid 1:nrow(...) expressions, use seq_len.","sm = foreach(cond = 1:nrow(times), .combine = rbind) %do% {"
R/internals.R,132,Variable and function name style should be camelCase.,featureGroups = .N = cond = ..cond = feature = NULL
tests/testthat.R,4,Only use single-quotes.,"test_check(""simphony"")"
tests/testthat/test-functional-simphony.R,15,"Avoid 1:nrow(...) expressions, use seq_len.","expectedAbund = foreach(r = 1:nrow(simData$abundData), .combine = rbind) %do% {"
tests/testthat/test-functional-simphony.R,47,"Place a space before left parenthesis, except in a function call.",for(timeNow in unique(simData$sampleMetadata$time)) {
tests/testthat/test-functional-simphony.R,50,"Place a space before left parenthesis, except in a function call.",for(groupNow in unique(simData$featureMetadata$group)) {
tests/testthat/test-functional-simphony.R,72,"Place a space before left parenthesis, except in a function call.","featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12),"
tests/testthat/test-functional-simphony.R,72,Put spaces around all infix operators.,"featureGroups = data.table::data.table(amp  = function(t) 5 * 2^(-t/12),"
tests/testthat/test-functional-simphony.R,73,"Place a space before left parenthesis, except in a function call.",base = function(t) 4 * 2^(-t/12))
tests/testthat/test-functional-simphony.R,73,Put spaces around all infix operators.,base = function(t) 4 * 2^(-t/12))
vignettes/examples.Rmd,99,"Place a space before left parenthesis, except in a function call.","featureGroups = data.table(amp =  c(function(tt) 3, function(tt) 3 * 2^(-tt / 24)),"
vignettes/introduction.Rmd,48,Commas should always have a space after.,"kable(simData$sampleMetadata[1:3,])"
vignettes/introduction.Rmd,112,Put spaces around all infix operators.,"labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity')"
vignettes/introduction.Rmd,112,"Place a space before left parenthesis, except in a function call.","labs(x = expression('Rhythm amplitude '*(log[2]~counts)), y = 'P-value of rhythmicity')"
 

lintr found issues with code

  1. R/internals.R line 63: Compound semicolons are discouraged. Replace them by a newline. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L63)
    makefunc = function(x) {x; function(m) x}   

To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

filename,line_number,message,line
R/internals.R,63,Compound semicolons are discouraged. Replace them by a newline.,makefunc = function(x) {x; function(m) x}
 

Warning, lint_ignore.csv contains lines not found in the current code:
R/accessories.R line 58: Variable and function name style should be camelCase.
r .N = time = mu = base = amp = rhyFunc = phase = period = NULL
R/accessories.R line 119: Variable and function name style should be camelCase.
r abund = .N = mu = sd = dispFunc = NULL
R/internals.R line 7: Variable and function name style should be camelCase.
r group = .N = phase = period = sd = NULL
R/internals.R line 132: Variable and function name style should be camelCase.
r featureGroups = .N = cond = ..cond = feature = NULL

lintr found issues with code

  1. R/accessories.R line 58: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L58)
    .N = time = mu = base = amp = rhyFunc = phase = period = NULL   
  2. R/accessories.R line 61: 1:.N is likely to be wrong in the empty edge case. Use seq_len(.N) instead. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L61)
    d = data.table(featureMetadata)[rep(1:.N, each = length(times))]   
  3. R/accessories.R line 119: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/accessories.R#L119)
    abund = .N = mu = sd = dispFunc = NULL   
  4. R/internals.R line 7: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L7)
    group = .N = phase = period = sd = NULL   
  5. R/internals.R line 15: 1:.N is likely to be wrong in the empty edge case. Use seq_len(.N) instead. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L15)
    featureGroups[, group := 1:.N]   
  6. R/internals.R line 134: Variable and function name style should be camelCase. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L134)
    featureGroups = .N = cond = ..cond = feature = NULL   
  7. R/internals.R line 142: 1:.N is likely to be wrong in the empty edge case. Use seq_len(.N) instead. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L142)
    fmNow = featureGroups[rep(1:.N, times = nFeaturesPerGroup)]   

To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

filename,line_number,message,line
R/accessories.R,58,Variable and function name style should be camelCase.,.N = time = mu = base = amp = rhyFunc = phase = period = NULL
R/accessories.R,61,1:.N is likely to be wrong in the empty edge case. Use seq_len(.N) instead.,"d = data.table(featureMetadata)[rep(1:.N, each = length(times))]"
R/accessories.R,119,Variable and function name style should be camelCase.,abund = .N = mu = sd = dispFunc = NULL
R/internals.R,7,Variable and function name style should be camelCase.,group = .N = phase = period = sd = NULL
R/internals.R,15,1:.N is likely to be wrong in the empty edge case. Use seq_len(.N) instead.,"featureGroups[, group := 1:.N]"
R/internals.R,134,Variable and function name style should be camelCase.,featureGroups = .N = cond = ..cond = feature = NULL
R/internals.R,142,1:.N is likely to be wrong in the empty edge case. Use seq_len(.N) instead.,"fmNow = featureGroups[rep(1:.N, times = nFeaturesPerGroup)]"
 

Elaborate on Vignette(s)

The Introduction vignette should be expanded on, explaining how the parameters to simphony are controlling the simulation output.

Do we need another vignette to show simulations of asymmetric oscillation?

Allow for arbitrary number of DR genes & size of rhythmicGroups

Currently, the number of DR genes must be divisible by the number of rows in rhythmicGroups. This should change so that any number of DR genes can be created, relative to the number of groups.

It has been decided that the repercussions of doing this (having an non-uniform number of genes per group across all groups) is fine.

Arbitrary Rhythmic Function

Add a first-class function to getRhythmicExpr which defaults to sin. This should be used to generate the rhythmic component of the gene expression.

@jakejh do we want to let different rows in rhyhmicGroups have their own rhythmic function? We can have it default to sin if a function is not supplied for a row.

  • Function placeholder added as an argument to getRhythmicExpr
  • User-specified function added as an argument to getSimulatedExpr

Shorten calls to foreach and data.table

I would suggest adding the following lines to simphony.R.

#' @importFrom data.table data.table
#' @importFrom foreach foreach

This would let us simplify data.table::data.table to data.table and foreach::foreach to foreach.

lintr found issues with code

  1. R/internals.R line 63: Compound semicolons are discouraged. Replace them by a newline. (https://github.com/hugheylab/simphony/blob/master/R/internals.R#L63)
    makefunc = function(x) {x; function(m) x}   

To have lintr ignore any of these issues, add the appropriate lines of those shown below to lint_ignore.csv at the top-level of the repository:

filename,line_number,message,line
R/internals.R,63,Compound semicolons are discouraged. Replace them by a newline.,makefunc = function(x) {x; function(m) x}
 

Warning, lint_ignore.csv contains lines not found in the current code:
R/accessories.R line 58: Variable and function name style should be camelCase.
r .N = time = mu = base = amp = rhyFunc = phase = period = NULL
R/accessories.R line 119: Variable and function name style should be camelCase.
r abund = .N = mu = sd = dispFunc = NULL
R/internals.R line 7: Variable and function name style should be camelCase.
r group = .N = phase = period = sd = NULL
R/internals.R line 132: Variable and function name style should be camelCase.
r featureGroups = .N = cond = ..cond = feature = NULL

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.