Skip to content

Commit

Permalink
Merge branch 'release-1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Nov 6, 2023
2 parents 61ff468 + 5e2218a commit f27ce34
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: DIscBIO
Date: 2023-10-09
Date: 2023-11-06
Title: A User-Friendly Pipeline for Biomarker Discovery in Single-Cell Transcriptomics
Version: 1.2.1
Version: 1.2.2
Authors@R:
c(
person(
Expand Down Expand Up @@ -39,7 +39,7 @@ Description: An open, multi-algorithmic pipeline for easy, fast and efficient
License: MIT + file LICENSE
Encoding: UTF-8
Imports: methods, TSCAN, httr, mclust, statmod, igraph,
RWeka, philentropy, NetIndices, png, grDevices,
RWeka, vegan, NetIndices, png, grDevices,
RColorBrewer, ggplot2, rpart, fpc, cluster, rpart.plot,
tsne, AnnotationDbi, org.Hs.eg.db, graphics, stats, utils, impute,
withr
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Expand Up @@ -110,7 +110,6 @@ importFrom(mclust,mclustBIC)
importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,validObject)
importFrom(philentropy,distance)
importFrom(png,readPNG)
importFrom(rpart,rpart)
importFrom(rpart.plot,rpart.plot)
Expand Down Expand Up @@ -142,6 +141,7 @@ importFrom(utils,download.file)
importFrom(utils,read.table)
importFrom(utils,write.csv)
importFrom(utils,write.table)
importFrom(vegan,vegdist)
importFrom(withr,local_options)
importFrom(withr,with_options)
importFrom(withr,with_par)
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,3 +1,7 @@
# DIscBIO 1.2.2

* Fixed calculation of Jaccard index (issue #44)

# DIscBIO 1.2.1

* Fixed integration and unit tests (issue #22, #37)
Expand Down
1 change: 0 additions & 1 deletion R/Jaccard.R
Expand Up @@ -10,7 +10,6 @@
#' @param K A numeric value of the number of clusters
#' @param plot if `TRUE`, plots the mean Jaccard similarities
#' @param R number of bootstrap replicates
#' @importFrom philentropy distance
#' @importFrom graphics barplot box
#' @return A plot of the mean Jaccard similarity coefficient per cluster.
Jaccard <- function(object, Clustering = "K-means", K, plot = TRUE, R = 100) {
Expand Down
6 changes: 3 additions & 3 deletions R/bootstrap.R
Expand Up @@ -11,10 +11,10 @@ bootstrap <- function(data, n_reps) {
return(results)
}

#' @importFrom vegan vegdist
JS <- function(data, indices) {
d <- data[indices, ]
jac <- suppressMessages(distance(t(d), method = "jaccard"))
jac <- vegan::vegdist(d, method = "jaccard")
jac1 <- 1 - jac
JSmean <- mean(jac1)
return(JSmean)
return(mean(jac1))
}
2 changes: 1 addition & 1 deletion tests/testthat/test-MRE.R
Expand Up @@ -66,7 +66,7 @@ test_that("tSNE is computed", {
test_that("Cluster plots output is as expexted", {
expect_equivalent(
object = Jaccard(sc, Clustering = "K-means", K = 2, plot = FALSE, R = 5),
expected = c(.417, .413),
expected = c(.683, .624),
tolerance = .01
)
expect_equal(
Expand Down

0 comments on commit f27ce34

Please sign in to comment.