diff --git a/.DS_Store b/.DS_Store index 58ed3fe..450952a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/R/RunCellToNeighborhood.R b/R/RunCellToNeighborhood.R index 4b73257..af80a7f 100644 --- a/R/RunCellToNeighborhood.R +++ b/R/RunCellToNeighborhood.R @@ -83,9 +83,9 @@ RunCellToNeighborhood <- function(node.object, # Add metadata based on ident slot # bug fix: add the Neighborhood - prefix - sending_type.meta <- data.frame(Seurat::Idents(node.object)[barcodes]) - rownames(sending_type.meta) <- paste(rownames(sending_type.meta),"Neighborhood",sep = '—') - + sending_type.meta <- data.frame(SendingCell = barcodes, + SendingType = Seurat::Idents(node.object)[barcodes], + row.names = paste(barcodes,"Neighborhood",sep = '—')) demo <- Seurat::AddMetaData(demo,metadata = sending_type.meta,col.name = c("SendingCell","SendingType")) diff --git a/R/RunNeighborhoodToCell.R b/R/RunNeighborhoodToCell.R index 6d39c40..637bea1 100644 --- a/R/RunNeighborhoodToCell.R +++ b/R/RunNeighborhoodToCell.R @@ -83,9 +83,9 @@ RunNeighborhoodToCell <- function(node.object, # Add metadata based on ident slot # bug fix: add the Neighborhood - prefix - receiving_type.meta <- data.frame(Seurat::Idents(node.object)[barcodes]) - rownames(receiving_type.meta) <- paste("Neighborhood",rownames(receiving_type.meta),sep = '—') - + receiving_type.meta <- data.frame(ReceivingCell = barcodes, + ReceivingType = Seurat::Idents(node.object)[barcodes], + row.names = paste("Neighborhood",barcodes,sep = '—')) demo <- Seurat::AddMetaData(demo,metadata = receiving_type.meta,col.name = c("ReceivingCell","ReceivingType"))