Skip to content

Commit

Permalink
sync with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Qile0317 committed Dec 25, 2024
1 parent dd45ab4 commit 0eb01ab
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 25 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ Imports:
VGAM,
hash,
purrr,
lifecycle,
withr
lifecycle
Suggests:
BiocManager,
BiocStyle,
Expand All @@ -58,7 +57,8 @@ Suggests:
scater,
spelling,
testthat (>= 3.0.0),
vdiffr
vdiffr,
withr
VignetteBuilder: knitr
Config/testthat/edition: 3
Language: en-US
Expand Down
23 changes: 2 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
MIT License

Copyright (c) 2023 Nick Borcherding

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
YEAR: 2024
COPYRIGHT HOLDER: scRepertoire authors
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2024 scRepertoire authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 8 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,19 @@
#' @importFrom methods slot
#' @keywords internal
.grabMeta <- function(sc) {
messString <- c("Meta data contains an 'ident' column and will likely result
in errors downstream.")
if (is_seurat_object(sc)) {
meta <- data.frame(sc[[]], slot(sc, "active.ident"))
if("ident" %in% colnames(meta)) {
message(messString)
}
colnames(meta)[length(meta)] <- "ident"

} else if (is_se_object(sc)){
meta <- data.frame(colData(sc))
if("ident" %in% colnames(meta)) {
message(messString)
}
rownames(meta) <- sc@colData@rownames
clu <- which(colnames(meta) == "label") # as set by colLabels()
colnames(meta)[clu] <- "ident"
Expand Down

0 comments on commit 0eb01ab

Please sign in to comment.