Skip to content
Snippets Groups Projects
Commit 12315825 authored by l.zappia's avatar l.zappia
Browse files

Merge branch 'master' into release-3.5

* master:
  Fix error handling when fitting means

From: Luke Zappia <lazappi@users.noreply.github.com>

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_5/madman/Rpacks/splatter@129584 bc3139a8-67e5-0310-9ffc-ced21a209358
parents 89d02a34 74179957
No related branches found
No related tags found
No related merge requests found
Package: splatter Package: splatter
Type: Package Type: Package
Title: Simple Simulation of Single-cell RNA Sequencing Data Title: Simple Simulation of Single-cell RNA Sequencing Data
Version: 1.0.1 Version: 1.0.2
Date: 2017-04-28 Date: 2017-05-15
Author: Luke Zappia Author: Luke Zappia
Authors@R: Authors@R:
c(person("Luke", "Zappia", role = c("aut", "cre"), c(person("Luke", "Zappia", role = c("aut", "cre"),
......
# 1.0.2
* Fix error handling when fitting means
# 1.0.1 # 1.0.1
* Fix scales in some difference plots * Fix scales in some difference plots
......
...@@ -81,9 +81,9 @@ splatEstMean <- function(norm.counts, params) { ...@@ -81,9 +81,9 @@ splatEstMean <- function(norm.counts, params) {
means <- winsorize(means, q = 0.1) means <- winsorize(means, q = 0.1)
fit <- try(fitdistrplus::fitdist(means, "gamma", method = "mge", fit <- fitdistrplus::fitdist(means, "gamma", method = "mge",
gof = "CvM")) gof = "CvM")
if (class(fit) == "try-error") { if (fit$convergence > 0) {
warning("Goodness of fit failed, using Method of Moments") warning("Goodness of fit failed, using Method of Moments")
fit <- fitdistrplus::fitdist(means, "gamma", method = "mme") fit <- fitdistrplus::fitdist(means, "gamma", method = "mme")
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment