Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Khodadadi-Jamayran authored and Khodadadi-Jamayran committed Nov 9, 2021
1 parent 71ca678 commit 215c777
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RoxygenNote: 7.1.1
BugReports: https://github.com/rezakj/iCellR/issues
URL: https://github.com/rezakj/iCellR
NeedsCompilation: yes
Packaged: 2021-10-07 18:26:50 UTC; khodaa01
Packaged: 2021-11-09 17:46:10 UTC; khodaa01
Author: Alireza Khodadadi-Jamayran [aut, cre]
(<https://orcid.org/0000-0003-2495-7504>),
Joseph Pucella [aut, ctb] (<https://orcid.org/0000-0003-0875-8046>),
Expand Down
17 changes: 17 additions & 0 deletions R/F0021.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#' @param data.type Choose from "main", "atac", "atac.imputed" and "imputed", default = "main"
#' @param conds.to.avg Choose the conditions you want to average, default = NULL (all conditions).
#' @param rounding.digits integer indicating the number of decimal places (round) or significant digits (signif) to be used.
#' @param low.cell.filt filter out clusters with low number of cells, default = 5.
#' @param round.num Rounding of Numbers, default = FALSE.
#' @return An object of class iCellR.
#' @import progress
Expand All @@ -13,6 +14,7 @@ clust.avg.exp <- function (x = NULL,
data.type = "main",
conds.to.avg = NULL,
rounding.digits = 4,
low.cell.filt = 5,
round.num = FALSE) {
if ("iCellR" != class(x)[1]) {
stop("x should be an object of class iCellR")
Expand All @@ -35,6 +37,21 @@ clust.avg.exp <- function (x = NULL,
sampleCondition <- DATA$clusters
conditions <- sort(unique(sampleCondition))
DATA1 <- DATA
#### warn and filter
warn <- as.data.frame(table(DATA1$clusters))
warn <- subset(warn, warn$Freq < low.cell.filt)
warn <- as.numeric(as.matrix(warn$Var1))
if(length(warn) != 0) {
message("########### Warning ###########")
message("###############################")
message("###############################")
message(paste("#### Filter warning: cluster",warn,"has less than",ncell.filt,"cells (cluster excluded)"))
DATA1<- subset(DATA1,!DATA1$clusters %in% warn)
conditions <- subset(conditions, !conditions %in% warn)
message("###############################")
message("###############################")
message("###############################")
}
## get main data
if (data.type == "main") {
Table <- x@main.data
Expand Down
2 changes: 1 addition & 1 deletion R/F0049.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @param object A data frame containing gene counts for cells.
#' @param scoring.List Genes that are used as a marker for phases.
#' @param return.stats Return the data or object. If FALSE the object would be returned.
#' @param scoring.method Choose from "coverage" or "tirosh" for scoring method. See: https://science.sciencemag.org/content/352/6282/189
#' @param scoring.method Choose from "coverage" or "tirosh" for scoring method.
#' @return The data frame object
#' @importFrom Hmisc cut2
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/F0051.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#' A dataset containing the genes for S phase
#'
#' @format A character with 43 genes
#' @source \url{https://science.sciencemag.org/content/352/6282/189}
#' @source \url{https://www.science.org/doi/abs/10.1126/science.aad0501}
"s.phase"
2 changes: 1 addition & 1 deletion R/F0053.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#' A dataset containing the genes for G2 and M phase
#'
#' @format A character with 54 genes
#' @source \url{https://science.sciencemag.org/content/352/6282/189}
#' @source \url{https://www.science.org/doi/abs/10.1126/science.aad0501}
"g2m.phase"
2 changes: 1 addition & 1 deletion R/F0071.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param data.type Choose from "raw.data" or "main.data", "imputed.data", default = "main.data".
#' @param scoring.List Genes that are used as a marker for phases.
#' @param return.stats Return the data or object. If FALSE the object would be returned.
#' @param scoring.method Choose from "tirosh (Tirosh, et. al. 2016), mean, sum, gsva, ssgsea, zscore and plage. , default = "tirosh". See: https://science.sciencemag.org/content/352/6282/189
#' @param scoring.method Choose from "tirosh (Tirosh, et. al. 2016), mean, sum, gsva, ssgsea, zscore and plage. , default = "tirosh".
#' @return The data frame object
#' @importFrom Hmisc cut2
#' @export
Expand Down
2 changes: 1 addition & 1 deletion man/cell.cycle.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/clust.avg.exp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/g2m.phase.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/i.score.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/s.phase.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 215c777

Please sign in to comment.