Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sirplus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BioCellGen-public
sirplus
Commits
9a6e3df9
Commit
9a6e3df9
authored
6 years ago
by
Luke Zappia
Browse files
Options
Downloads
Patches
Plain Diff
Fix errors in splatEstLib normality test
Fixes #48
parent
9d454224
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
DESCRIPTION
+2
-2
2 additions, 2 deletions
DESCRIPTION
NEWS.md
+8
-2
8 additions, 2 deletions
NEWS.md
R/splat-estimate.R
+12
-3
12 additions, 3 deletions
R/splat-estimate.R
man/splatEstLib.Rd
+1
-1
1 addition, 1 deletion
man/splatEstLib.Rd
with
23 additions
and
8 deletions
DESCRIPTION
+
2
−
2
View file @
9a6e3df9
Package: splatter
Type: Package
Title: Simple Simulation of Single-cell RNA Sequencing Data
Version: 1.5.
0
Date: 2018-0
5-0
2
Version: 1.5.
1
Date: 2018-0
6-1
2
Author: Luke Zappia
Authors@R:
c(person("Luke", "Zappia", role = c("aut", "cre"),
...
...
This diff is collapsed.
Click to expand it.
NEWS.md
+
8
−
2
View file @
9a6e3df9
## Version 1.5.0 (2018-01-02)
## Version 1.5.1 (2018-06-12)
*
Fix normality testing error in splatEstLib
*
Correct p-value cutoff in normality test
*
Sample library sizes for normality testing if > 5000 cells
## Version 1.5.0 (2018-05-02)
*
Bioconductor 3.7 devel
# Version 1.4.0 (2018-0
1
-02)
# Version 1.4.0 (2018-0
5
-02)
*
Bioconductor 3.7 release
...
...
This diff is collapsed.
Click to expand it.
R/splat-estimate.R
+
12
−
3
View file @
9a6e3df9
...
...
@@ -101,7 +101,7 @@ splatEstMean <- function(norm.counts, params) {
#' Estimate Splat library size parameters
#'
#' The Shapiro-Wilk test is used to determine if the library sizes are
#' The Shapiro-Wilk
s
test is used to determine if the library sizes are
#' normally distributed. If so a normal distribution is fitted to the library
#' sizes, if not (most cases) a log-normal distribution is fitted and the
#' estimated parameters are added to the params object. See
...
...
@@ -116,8 +116,17 @@ splatEstMean <- function(norm.counts, params) {
splatEstLib
<-
function
(
counts
,
params
)
{
lib.sizes
<-
colSums
(
counts
)
norm.test
<-
shapiro.test
(
lib.sizes
)
lib.norm
<-
norm.test
$
p.value
<
0.05
if
(
length
(
lib.sizes
)
>
5000
)
{
message
(
"NOTE: More than 5000 cells provided. "
,
"5000 sampled library sizes will be used to test normality."
)
lib.sizes.sampled
<-
sample
(
lib.sizes
,
5000
,
replace
=
FALSE
)
}
else
{
lib.sizes.sampled
<-
lib.sizes
}
norm.test
<-
shapiro.test
(
lib.sizes.sampled
)
lib.norm
<-
norm.test
$
p.value
>
0.2
if
(
lib.norm
)
{
fit
<-
fitdistrplus
::
fitdist
(
lib.sizes
,
"norm"
)
...
...
This diff is collapsed.
Click to expand it.
man/splatEstLib.Rd
+
1
−
1
View file @
9a6e3df9
...
...
@@ -15,7 +15,7 @@ splatEstLib(counts, params)
splatParams object with estimated values.
}
\description{
The Shapiro-Wilk test is used to determine if the library sizes are
The Shapiro-Wilk
s
test is used to determine if the library sizes are
normally distributed. If so a normal distribution is fitted to the library
sizes, if not (most cases) a log-normal distribution is fitted and the
estimated parameters are added to the params object. See
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment