Skip to content

Commit b2808fa

Browse files
committed
Merge branch 'release-1.2.3'
* release-1.2.3: (27 commits) 🐞 Fix: remove cran-comments.md from build 🐞 Fix: update package date 🐞 Fix: fixed error message 🐞 Fix: dependency list ✨ Feat: move AnnotationDbi to Suggests ✨ Feat: move AnnotationDbi to Suggests ✨ Feat: ignoring `CRAN-SUBMISSION` token ✨ Feat: add cran-comments.md ✨ Feat: add rhub setup 🐞 Fix: typos Increment version number to 1.2.3 🐞 Fix: update package date and language 🐞 Fix: reduce column length 🐞 Fix: syntax Updated NEWS.md 🐞 Fix: replace `seq_len(length())` with `seq_along()` 🐞 Fix: updated CI action version ✨ Feat: relaxed test expectation Increment version number to 1.2.2.9000 ✨ Feat: remove redundant code ...
2 parents f27ce34 + 457e24b commit b2808fa

39 files changed

+249
-174
lines changed

β€Ž.Rbuildignoreβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ Aux
2929
binder
3030
^\.github$
3131
tests/
32+
^CRAN-SUBMISSION$
33+
cran-comments.md

β€Ž.github/workflows/rhub.yamlβ€Ž

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
2+
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
3+
# You can update this file to a newer version using the rhub2 package:
4+
#
5+
# rhub::rhub_setup()
6+
#
7+
# It is unlikely that you need to modify this file manually.
8+
9+
name: R-hub
10+
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
11+
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
config:
16+
description: 'A comma separated list of R-hub platforms to use.'
17+
type: string
18+
default: 'linux,windows,macos'
19+
name:
20+
description: 'Run name. You can leave this empty now.'
21+
type: string
22+
id:
23+
description: 'Unique ID. You can leave this empty now.'
24+
type: string
25+
26+
jobs:
27+
28+
setup:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
containers: ${{ steps.rhub-setup.outputs.containers }}
32+
platforms: ${{ steps.rhub-setup.outputs.platforms }}
33+
34+
steps:
35+
# NO NEED TO CHECKOUT HERE
36+
- uses: r-hub/actions/setup@v1
37+
with:
38+
config: ${{ github.event.inputs.config }}
39+
id: rhub-setup
40+
41+
linux-containers:
42+
needs: setup
43+
if: ${{ needs.setup.outputs.containers != '[]' }}
44+
runs-on: ubuntu-latest
45+
name: ${{ matrix.config.label }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
config: ${{ fromJson(needs.setup.outputs.containers) }}
50+
container:
51+
image: ${{ matrix.config.container }}
52+
53+
steps:
54+
- uses: r-hub/actions/checkout@v1
55+
- uses: r-hub/actions/platform-info@v1
56+
with:
57+
token: ${{ secrets.RHUB_TOKEN }}
58+
job-config: ${{ matrix.config.job-config }}
59+
- uses: r-hub/actions/setup-deps@v1
60+
with:
61+
token: ${{ secrets.RHUB_TOKEN }}
62+
job-config: ${{ matrix.config.job-config }}
63+
- uses: r-hub/actions/run-check@v1
64+
with:
65+
token: ${{ secrets.RHUB_TOKEN }}
66+
job-config: ${{ matrix.config.job-config }}
67+
68+
other-platforms:
69+
needs: setup
70+
if: ${{ needs.setup.outputs.platforms != '[]' }}
71+
runs-on: ${{ matrix.config.os }}
72+
name: ${{ matrix.config.label }}
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
config: ${{ fromJson(needs.setup.outputs.platforms) }}
77+
78+
steps:
79+
- uses: r-hub/actions/checkout@v1
80+
- uses: r-hub/actions/setup-r@v1
81+
with:
82+
job-config: ${{ matrix.config.job-config }}
83+
token: ${{ secrets.RHUB_TOKEN }}
84+
- uses: r-hub/actions/platform-info@v1
85+
with:
86+
token: ${{ secrets.RHUB_TOKEN }}
87+
job-config: ${{ matrix.config.job-config }}
88+
- uses: r-hub/actions/setup-deps@v1
89+
with:
90+
job-config: ${{ matrix.config.job-config }}
91+
token: ${{ secrets.RHUB_TOKEN }}
92+
- uses: r-hub/actions/run-check@v1
93+
with:
94+
job-config: ${{ matrix.config.job-config }}
95+
token: ${{ secrets.RHUB_TOKEN }}

β€Ž.github/workflows/test-coverage.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Upload test results
4646
if: failure()
47-
uses: actions/upload-artifact@v3
47+
uses: actions/upload-artifact@v4
4848
with:
4949
name: coverage-test-failures
5050
path: ${{ runner.temp }}/package

β€Ž.gitignoreβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
inst/doc
22
doc
33
Meta
4-
Aux
4+
Aux
5+
.Rbuildignore
6+
CRAN-SUBMISSION

β€ŽDESCRIPTIONβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: DIscBIO
2-
Date: 2023-11-06
2+
Date: 2026-01-08
33
Title: A User-Friendly Pipeline for Biomarker Discovery in Single-Cell Transcriptomics
4-
Version: 1.2.2
4+
Version: 1.2.3
55
Authors@R:
66
c(
77
person(
@@ -41,15 +41,13 @@ Encoding: UTF-8
4141
Imports: methods, TSCAN, httr, mclust, statmod, igraph,
4242
RWeka, vegan, NetIndices, png, grDevices,
4343
RColorBrewer, ggplot2, rpart, fpc, cluster, rpart.plot,
44-
tsne, AnnotationDbi, org.Hs.eg.db, graphics, stats, utils, impute,
45-
withr
44+
tsne, graphics, stats, utils, impute, withr
4645
Depends:
4746
R (>= 4.0), SingleCellExperiment
4847
Suggests:
49-
testthat,
50-
Seurat
48+
testthat, Seurat, org.Hs.eg.db, AnnotationDbi
5149
LazyData: true
52-
RoxygenNote: 7.2.3
50+
RoxygenNote: 7.3.3
5351
URL: https://github.com/ocbe-uio/DIscBIO
5452
BugReports: https://github.com/ocbe-uio/DIscBIO/issues
5553
Collate:
@@ -94,3 +92,5 @@ Collate:
9492
'datasets.R'
9593
'internal-functions-samr-adapted.R'
9694
'internal-functions.R'
95+
'retrieve_geneList.R'
96+
Language: en-US

β€ŽNAMESPACEβ€Ž

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ exportMethods(plotSilhouette)
3939
exportMethods(plotSymbolstSNE)
4040
exportMethods(plottSNE)
4141
exportMethods(pseudoTimeOrdering)
42-
import(org.Hs.eg.db)
4342
importClassesFrom(SingleCellExperiment,SingleCellExperiment)
44-
importFrom(AnnotationDbi,keys)
4543
importFrom(NetIndices,GenInd)
4644
importFrom(RColorBrewer,brewer.pal)
4745
importFrom(RWeka,J48)
@@ -100,10 +98,10 @@ importFrom(igraph,distance_table)
10098
importFrom(igraph,get.adjacency)
10199
importFrom(igraph,get.edgelist)
102100
importFrom(igraph,get.shortest.paths)
103-
importFrom(igraph,graph.adjacency)
104101
importFrom(igraph,graph.data.frame)
102+
importFrom(igraph,graph_from_adjacency_matrix)
105103
importFrom(igraph,mean_distance)
106-
importFrom(igraph,minimum.spanning.tree)
104+
importFrom(igraph,mst)
107105
importFrom(impute,impute.knn)
108106
importFrom(mclust,Mclust)
109107
importFrom(mclust,mclustBIC)
@@ -137,6 +135,7 @@ importFrom(stats,smooth.spline)
137135
importFrom(stats,var)
138136
importFrom(tsne,tsne)
139137
importFrom(utils,capture.output)
138+
importFrom(utils,data)
140139
importFrom(utils,download.file)
141140
importFrom(utils,read.table)
142141
importFrom(utils,write.csv)

β€ŽNEWS.mdβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# DIscBIO 1.2.3
2+
3+
* Delinted package
4+
* Removed dependency on `philentropy` and `org.Hs.eg.db` (issue #44, #45)
5+
16
# DIscBIO 1.2.2
27

38
* Fixed calculation of Jaccard index (issue #44)

β€ŽR/DIscBIO-classes.Rβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' prediction of rare cell types.
2323
#' @slot cpart A vector containing the final clustering partition computed
2424
#' by K-means.
25-
#' @slot fcol A vector contaning the colour scheme for the clusters.
25+
#' @slot fcol A vector containing the colour scheme for the clusters.
2626
#' @slot filterpar A list containing the parameters used for cell and gene
2727
#' filtering based on expression.
2828
#' @slot clusterpar A list containing the parameters used for the K-means

β€ŽR/DIscBIO-generic-ClustDiffGenes.Rβ€Ž

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#' @param filename_binom Name of the exported binomial file
1313
#' @param filename_sigdeg Name of the exported sigDEG file
1414
#' @importFrom stats pbinom median
15-
#' @import org.Hs.eg.db
1615
#' @rdname ClustDiffGenes
1716
#' @return A list containing two tables.
1817
#' @export
@@ -103,50 +102,29 @@ setMethod(
103102
DEGsS <- vector()
104103
DEGsTable <- data.frame()
105104

106-
for (n in 1:K) {
107-
if (length(cdiff[[n]][, 1]) == 0) {
108-
next
109-
}
105+
# Generate gene list
106+
geneList <- retrieve_geneList()
107+
GL <- c(1, "MTRNR2", "ENSG00000210082")
108+
GL1 <- c(1, "MTRNR1", "ENSG00000211459")
109+
geneList <- rbind(geneList, GL, GL1)
110+
gene_list <- geneList[, 3]
110111

112+
for (n in 1:K) {
111113
if (length(cdiff[[n]][, 1]) > 0) {
112114
p.adj <- p.adjust(cdiff[[n]][, 4], method = "bonferroni")
113115
out <- cbind(cdiff[[n]], p.adj)
114116
out <- subset(out, out[, 5] < fdr)
115117
if (length(out[, 1]) > 0) {
116118
Regulation <- vector()
117-
for (i in seq_len(length(out[, 1]))) {
119+
for (i in seq_along(out[, 1])) {
118120
if (out[i, 1] > out[i, 2]) {
119121
Regulation[i] <- "Down"
120122
} else {
121123
Regulation[i] <- "Up"
122124
}
123125
}
124126
out <- cbind(out, Regulation)
125-
if (quiet) {
126-
suppressMessages(
127-
geneList <-
128-
AnnotationDbi::select(
129-
org.Hs.eg.db,
130-
keys = keys(org.Hs.eg.db),
131-
columns = c("SYMBOL", "ENSEMBL")
132-
)
133-
)
134-
GL <- c(1, "MTRNR2", "ENSG00000210082")
135-
GL1 <- c(1, "MTRNR1", "ENSG00000211459")
136-
geneList <- rbind(geneList, GL, GL1)
137-
} else {
138-
geneList <-
139-
AnnotationDbi::select(
140-
org.Hs.eg.db,
141-
keys = keys(org.Hs.eg.db),
142-
columns = c("SYMBOL", "ENSEMBL")
143-
)
144-
GL <- c(1, "MTRNR2", "ENSG00000210082")
145-
GL1 <- c(1, "MTRNR1", "ENSG00000211459")
146-
geneList <- rbind(geneList, GL, GL1)
147-
}
148127
genes <- rownames(out)
149-
gene_list <- geneList[, 3]
150128
idx_genes <- is.element(gene_list, genes)
151129
genes2 <- geneList[idx_genes, ]
152130
Final <- cbind(genes, out)
@@ -233,6 +211,7 @@ setMethod(
233211
}
234212
}
235213
}
214+
236215
if (length(DEGsTable) > 0) {
237216
colnames(DEGsTable) <- c(
238217
"Target Cluster", "VS", "Gene number", "File name",

β€ŽR/DIscBIO-generic-Clustexp.Rβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @param object \code{DISCBIO} class object.
66
#' @param clustnr Maximum number of clusters for the derivation of the cluster
77
#' number by the saturation of mean within-cluster-dispersion. Default is 20.
8-
#' @param bootnr A numeric value of booststrapping runs for \code{clusterboot}.
8+
#' @param bootnr A numeric value of bootstrapping runs for \code{clusterboot}.
99
#' Default is 50.
1010
#' @param metric Is the method to transform the input data to a distance object.
1111
#' Metric has to be one of the following: ["spearman", "pearson", "kendall",

0 commit comments

Comments
Β (0)