Skip to content

Commit

Permalink
Merge pull request satijalab#337 from satijalab/fix/FeatureScatter_pr…
Browse files Browse the repository at this point in the history
…efix

add prefix to feature 1 2
  • Loading branch information
andrewwbutler authored Jul 9, 2020
2 parents 0f036f5 + c28be7f commit 84c921e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: Seurat
Version: 3.1.5.9013
Version: 3.1.5.9014
Date: 2020-07-09
Title: Tools for Single Cell Genomics
Description: A toolkit for quality control, analysis, and exploration of single cell RNA sequencing data. 'Seurat' aims to enable users to identify and interpret sources of heterogeneity from single cell transcriptomic measurements, and to integrate diverse types of single cell data. See Satija R, Farrell J, Gennert D, et al (2015) <doi:10.1038/nbt.3192>, Macosko E, Basu A, Satija R, et al (2015) <doi:10.1016/j.cell.2015.05.002>, and Stuart T, Butler A, et al (2019) <doi:10.1016/j.cell.2019.05.031> for more details. Please note: SDMTools is available is available from the CRAN archives with install.packages(<"https://cran.rstudio.com//src/contrib/Archive/SDMTools/SDMTools_1.1-221.2.tar.gz">, repos = NULL); it is not in the standard repositories.
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ object inheriting from the Assay class
- Efficiency improvements in anchor scoring (`ScoreAnchors`)
- Fix bug in `FindClusters()` when the last node has no edges
- Default to weighted = TRUE when constructing igraph objects in `RunLeiden`. Remove corresponding weights parameter from `FindClusters()`.
- Fix handling of keys in `FeatureScatter()`

## [3.1.5] - 2020-04-14
### Added
Expand Down
6 changes: 4 additions & 2 deletions R/visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -1487,13 +1487,15 @@ FeatureScatter <- function(
cells = cells,
slot = slot
)
if (isFALSE(x = feature1 %in% colnames(x = data))) {
if (!grepl(pattern = feature1, x = colnames(x = data)[1])) {
stop("Feature 1 (", feature1, ") not found.", call. = FALSE)
}
if (isFALSE(x = feature2 %in% colnames(x = data))) {
if (!grepl(pattern = feature2, x = colnames(x = data)[2])) {
stop("Feature 2 (", feature2, ") not found.", call. = FALSE)
}
data <- as.data.frame(x = data)
feature1 <- colnames(x = data)[1]
feature2 <- colnames(x = data)[2]
for (group in group.by) {
if (!is.factor(x = data[, group])) {
data[, group] <- factor(x = data[, group])
Expand Down

0 comments on commit 84c921e

Please sign in to comment.