Skip to content

Commit

Permalink
Merge pull request #22 from msraredon/dev_master
Browse files Browse the repository at this point in the history
systemToCell metadata fix: add prefix
  • Loading branch information
jcyang34 authored Nov 9, 2023
2 parents 227b1dc + f2c7004 commit 155ba29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion R/RunCellToSystem.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ RunCellToSystem <- function(sys.small,
meta.data.to.add <- data.frame(as.character(colnames(lig.map)))
rownames(meta.data.to.add) <- paste(colnames(lig.map),"System",sep = '')
demo <- Seurat::AddMetaData(demo,metadata = meta.data.to.add,col.name = 'SendingCell')
demo <- Seurat::AddMetaData(demo,metadata = Seurat::Idents(sys.small),col.name = 'SendingType')

# bug fix: add the system - prefix
sending_type.meta <- data.frame(Seurat::Idents(sys.small))
rownames(sending_type.meta) <- paste(rownames(sending_type.meta),"System",sep = '')

demo <- Seurat::AddMetaData(demo,metadata = sending_type.meta,col.name = 'SendingType')

# Gather and assemble additional metadata
if (!is.null(meta.data.to.map)){
Expand Down
7 changes: 6 additions & 1 deletion R/RunSystemToCell.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ RunSystemToCell <- function(sys.small,
meta.data.to.add <- data.frame(as.character(colnames(rec.map)))
rownames(meta.data.to.add) <- paste("System",colnames(rec.map),sep = '')
demo <- Seurat::AddMetaData(demo,metadata = meta.data.to.add,col.name = 'ReceivingCell')
demo <- Seurat::AddMetaData(demo,metadata = Seurat::Idents(sys.small),col.name = 'ReceivingType')

# bug fix: add the system - prefix
receiving_type.meta <- data.frame(Seurat::Idents(sys.small))
rownames(receiving_type.meta) <- paste("System",rownames(receiving_type.meta),sep = '')

demo <- Seurat::AddMetaData(demo,metadata = receiving_type.meta,col.name = 'ReceivingType')

# Gather and assemble additional metadata
if (!is.null(meta.data.to.map)){
Expand Down

0 comments on commit 155ba29

Please sign in to comment.