Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewritten parallelism to BiocParallel package #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 58 additions & 26 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,34 +1,66 @@
Package: SC3
Type: Package
Package: SC3
Title: Single-Cell Consensus Clustering
Version: 1.15.1
Authors@R:
c(person(given = "Vladimir",
family = "Kiselev",
role = c("cre", "aut"),
email = "[email protected]"),
person(given = "Andrew",
family = "Yiu",
role = "ctb"),
person(given = "Tallulah",
family = "Andrews",
role = "ctb"),
person(given = "Martin",
family = "Hemberg",
role = "aut"))
Author: Vladimir Kiselev
Maintainer: Vladimir Kiselev <[email protected]>
Authors@R: c(person("Vladimir", "Kiselev",
email = "[email protected]",
role=c("cre", "aut")),
person("Andrew", "Yiu",
role=c("ctb")),
person("Tallulah", "Andrews",
role=c("ctb")),
person("Martin", "Hemberg",
role=c("aut")))
Description: A tool for unsupervised clustering and analysis of single cell RNA-Seq data.
Description: A tool for unsupervised clustering and analysis of single
cell RNA-Seq data.
License: GPL-3
Imports: graphics, stats, utils, methods, e1071, parallel, foreach,
doParallel, doRNG, shiny, ggplot2, pheatmap (>= 1.0.8),
ROCR, robustbase, rrcov, cluster, WriteXLS,
Rcpp (>= 0.11.1), SummarizedExperiment, SingleCellExperiment,
BiocGenerics, S4Vectors
Depends: R(>= 3.3)
LinkingTo: Rcpp, RcppArmadillo
LazyData: TRUE
RoxygenNote: 6.0.1
Suggests: knitr, rmarkdown, mclust, scater
VignetteBuilder: knitr
biocViews: ImmunoOncology, SingleCell, Software, Classification, Clustering, DimensionReduction,
SupportVectorMachine, RNASeq, Visualization, Transcriptomics,
DataRepresentation, GUI, DifferentialExpression, Transcription
NeedsCompilation: no
URL: https://github.com/hemberg-lab/SC3
BugReports: https://support.bioconductor.org/t/sc3/
Depends:
R (>= 3.3)
Imports:
BiocGenerics,
BiocParallel,
cluster,
e1071,
ggplot2,
graphics,
methods,
pheatmap (>= 1.0.8),
Rcpp (>= 0.11.1),
robustbase,
ROCR,
rrcov,
S4Vectors,
shiny,
SingleCellExperiment,
stats,
SummarizedExperiment,
utils,
WriteXLS
Suggests:
BiocStyle,
knitr,
mclust,
rmarkdown,
scater
LinkingTo:
Rcpp,
RcppArmadillo
VignetteBuilder:
knitr
biocViews: ImmunoOncology, SingleCell, Software, Classification,
Clustering, DimensionReduction, SupportVectorMachine, RNASeq,
Visualization, Transcriptomics, DataRepresentation, GUI,
DifferentialExpression, Transcription
Encoding: UTF-8
LazyData: TRUE
NeedsCompilation: no
RoxygenNote: 7.1.1
7 changes: 0 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ importFrom(SummarizedExperiment,assayNames)
importFrom(SummarizedExperiment,colData)
importFrom(SummarizedExperiment,rowData)
importFrom(WriteXLS,WriteXLS)
importFrom(doParallel,registerDoParallel)
importFrom(doRNG,"%dorng%")
importFrom(e1071,svm)
importFrom(foreach,"%dopar%")
importFrom(foreach,foreach)
importFrom(ggplot2,aes)
importFrom(ggplot2,geom_bar)
importFrom(ggplot2,ggplot)
Expand All @@ -53,9 +49,6 @@ importFrom(ggplot2,ylim)
importFrom(graphics,plot)
importFrom(methods,as)
importFrom(methods,new)
importFrom(parallel,detectCores)
importFrom(parallel,makeCluster)
importFrom(parallel,stopCluster)
importFrom(pheatmap,pheatmap)
importFrom(robustbase,covMcd)
importFrom(rrcov,PcaHubert)
Expand Down
41 changes: 20 additions & 21 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
#' @export
setGeneric("sc3", signature = "object", function(object, ks = NULL,
gene_filter = TRUE, pct_dropout_min = 10, pct_dropout_max = 90,
d_region_min = 0.04, d_region_max = 0.07, svm_num_cells = NULL,
svm_train_inds = NULL, svm_max = 5000, n_cores = NULL, kmeans_nstart = NULL,
kmeans_iter_max = 1e+09, k_estimator = FALSE, biology = FALSE, rand_seed = 1) {
setGeneric("sc3", signature = "object", function(object, ks = NULL,
gene_filter = TRUE, pct_dropout_min = 10, pct_dropout_max = 90,
d_region_min = 0.04, d_region_max = 0.07, svm_num_cells = NULL,
svm_train_inds = NULL, svm_max = 5000, kmeans_nstart = NULL,
kmeans_iter_max = 1e+09, k_estimator = FALSE, biology = FALSE,
BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3")
})

#' @export
setGeneric("sc3_estimate_k", signature = "object", function(object) {
setGeneric("sc3_estimate_k", signature = "object", function(object, BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3_estimate_k")
})

#' @export
setGeneric("sc3_prepare", function(object, gene_filter = TRUE,
pct_dropout_min = 10, pct_dropout_max = 90, d_region_min = 0.04,
d_region_max = 0.07, svm_num_cells = NULL, svm_train_inds = NULL,
svm_max = 5000, n_cores = NULL, kmeans_nstart = NULL,
kmeans_iter_max = 1e+09, rand_seed = 1) {
setGeneric("sc3_prepare", function(object, gene_filter = TRUE,
pct_dropout_min = 10, pct_dropout_max = 90, d_region_min = 0.04,
d_region_max = 0.07, svm_num_cells = NULL, svm_train_inds = NULL,
svm_max = 5000, kmeans_nstart = NULL, kmeans_iter_max = 1e+09) {
standardGeneric("sc3_prepare")
})

#' @export
setGeneric("sc3_calc_dists", signature = "object", function(object) {
setGeneric("sc3_calc_dists", signature = "object", function(object, BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3_calc_dists")
})

#' @export
setGeneric("sc3_calc_transfs", signature = "object", function(object) {
setGeneric("sc3_calc_transfs", signature = "object", function(object, BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3_calc_transfs")
})

#' @export
setGeneric("sc3_kmeans", signature = "object", function(object, ks = NULL) {
setGeneric("sc3_kmeans", signature = "object", function(object, ks = NULL, BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3_kmeans")
})

#' @export
setGeneric("sc3_calc_consens", signature = "object", function(object) {
setGeneric("sc3_calc_consens", signature = "object", function(object, BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3_calc_consens")
})

#' @export
setGeneric("sc3_calc_biology", signature = "object", function(object, ks = NULL,
regime = NULL) {
setGeneric("sc3_calc_biology", signature = "object", function(object, ks = NULL, regime = NULL, BPPARAM = BiocParallel::bpparam()) {
standardGeneric("sc3_calc_biology")
})

Expand All @@ -58,7 +57,7 @@ setGeneric("sc3_run_svm", signature = "object", function(object, ks = NULL) {
})

#' @export
setGeneric("sc3_plot_consensus", signature = "object", function(object, k,
setGeneric("sc3_plot_consensus", signature = "object", function(object, k,
show_pdata = NULL) {
standardGeneric("sc3_plot_consensus")
})
Expand All @@ -74,13 +73,13 @@ setGeneric("sc3_plot_expression", signature = "object", function(object, k, show
})

#' @export
setGeneric("sc3_plot_de_genes", signature = "object", function(object,
setGeneric("sc3_plot_de_genes", signature = "object", function(object,
k, p.val = 0.01, show_pdata = NULL) {
standardGeneric("sc3_plot_de_genes")
})

#' @export
setGeneric("sc3_plot_markers", signature = "object", function(object, k, auroc = 0.85,
setGeneric("sc3_plot_markers", signature = "object", function(object, k, auroc = 0.85,
p.val = 0.01, show_pdata = NULL) {
standardGeneric("sc3_plot_markers")
})
Expand All @@ -91,7 +90,7 @@ setGeneric("sc3_plot_cluster_stability", signature = "object", function(object,
})

#' @export
setGeneric("sc3_export_results_xls", signature = "object", function(object,
setGeneric("sc3_export_results_xls", signature = "object", function(object,
filename = "sc3_results.xls") {
standardGeneric("sc3_export_results_xls")
})
Loading