Skip to content

Commit

Permalink
Merge pull request satijalab#778 from satijalab/seurat5_devel
Browse files Browse the repository at this point in the history
Seurat5 devel
  • Loading branch information
yuhanH authored Jul 14, 2023
2 parents 96dc134 + c577927 commit f6ec683
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 63 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fix `pt.size` bug when rasterization is set to true ([#7379](https://github.com/satijalab/seurat/issues/7379))
- Fix `FoldChange` and `FindMarkers` to support all normalization approaches ([#7115](https://github.com/satijalab/seurat/pull/7115),[#7110](https://github.com/satijalab/seurat/issues/7110),[#7095](https://github.com/satijalab/seurat/issues/7095),[#6976](https://github.com/satijalab/seurat/issues/6976),[#6654](https://github.com/satijalab/seurat/issues/6654),[#6701](https://github.com/satijalab/seurat/issues/6701),[#6773](https://github.com/satijalab/seurat/issues/6773), [#7107](https://github.com/satijalab/seurat/issues/7107))
- Fix for handling newer ParseBio formats in `ReadParseBio` ([#7565](https://github.com/satijalab/seurat/pull/7565))
- Fix bug in `ReadMtx()` to add back missing parameters

# Seurat 4.3.0 (2022-11-18)

Expand Down
40 changes: 23 additions & 17 deletions R/preprocessing.R
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ GetResidual <- function(
"This SCTAssay contains multiple SCT models. Computing residuals for cells using different models"
)
}
if (!umi.assay %in% Assays(object = object) ||
if (!umi.assay %in% Assays(object = object) ||
length(x = Layers(object = object[[umi.assay]], search = 'counts')) == 0) {
return(object)
}
Expand Down Expand Up @@ -1538,15 +1538,18 @@ ReadAkoya <- function(
#' }
#'
ReadMtx <- function(
mtx,
cells,
features,
cell.column = 1,
feature.column = 2,
skip.cell = 0,
skip.feature = 0,
unique.features = TRUE,
strip.suffix = FALSE
mtx,
cells,
features,
cell.column = 1,
feature.column = 2,
cell.sep = "\t",
feature.sep = "\t",
skip.cell = 0,
skip.feature = 0,
mtx.transpose = FALSE,
unique.features = TRUE,
strip.suffix = FALSE
) {
all.files <- list(
"expression matrix" = mtx,
Expand Down Expand Up @@ -1585,14 +1588,14 @@ ReadMtx <- function(
cell.barcodes <- read.table(
file = all.files[['barcode list']],
header = FALSE,
sep = '\t',
sep = cell.sep,
row.names = NULL,
skip = skip.cell
)
feature.names <- read.table(
file = all.files[['feature list']],
header = FALSE,
sep = '\t',
sep = feature.sep,
row.names = NULL,
skip = skip.feature
)
Expand Down Expand Up @@ -1645,7 +1648,7 @@ ReadMtx <- function(
feature.column,
". Try specifiying a different column.",
call. = FALSE
)
)
} else {
warning(
"Some features names are NA in column ",
Expand All @@ -1654,7 +1657,7 @@ ReadMtx <- function(
replacement.column,
".",
call. = FALSE
)
)
}
feature.names[na.features, feature.column] <- feature.names[na.features, replacement.column]
}
Expand All @@ -1663,6 +1666,9 @@ ReadMtx <- function(
feature.names <- make.unique(names = feature.names)
}
data <- readMM(file = all.files[['expression matrix']])
if (mtx.transpose) {
data <- t(x = data)
}
if (length(x = cell.names) != ncol(x = data)) {
stop(
"Matrix has ",
Expand All @@ -1675,7 +1681,7 @@ ReadMtx <- function(
no = ""
),
call. = FALSE
)
)
}
if (length(x = feature.names) != nrow(x = data)) {
stop(
Expand All @@ -1689,7 +1695,7 @@ ReadMtx <- function(
no = ""
),
call. = FALSE
)
)
}

colnames(x = data) <- cell.names
Expand Down Expand Up @@ -3228,7 +3234,7 @@ SCTransform.default <- function(
immediate. = TRUE
)
}

vst.args[['vst.flavor']] <- vst.flavor
vst.args[['umi']] <- umi
vst.args[['cell_attr']] <- cell.attr
Expand Down
47 changes: 47 additions & 0 deletions man/CCAIntegration.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions man/FindAllMarkers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 0 additions & 40 deletions man/HarmonyIntegration.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 48 additions & 1 deletion man/JointPCAIntegration.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions man/RPCAIntegration.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/ReadMtx.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f6ec683

Please sign in to comment.