Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RNAIntegration.R #2178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions R/RNAIntegration.R
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ addGeneIntegrationMatrix <- function(

#Log-Normalize
mat <- log(mat + 1) #use natural log
rownames(mat) <- as.character(rownames(mat)) # The Seurat::CreateSeuratObject function requires that the rownames of mat must be vector, not matrix. But the rownames passed to mat in the previous code was actually a matrix, so you only need to add a command line before this code, this will cast the rownames of mat to a vector
seuratATAC <- Seurat::CreateSeuratObject(counts = mat[head(seq_len(nrow(mat)), 5), , drop = FALSE])
seuratATAC[["GeneScore"]] <- Seurat::CreateAssayObject(counts = mat)

Expand Down