diff --git a/R/RunCellToNeighborhood.R b/R/RunCellToNeighborhood.R index e983b8d..f5db948 100644 --- a/R/RunCellToNeighborhood.R +++ b/R/RunCellToNeighborhood.R @@ -70,7 +70,11 @@ RunCellToNeighborhood <- function(sys.small, # Add metadata based on ident slot demo <- Seurat::AddMetaData(demo,metadata = barcodes,col.name = 'SendingCell') - demo <- Seurat::AddMetaData(demo,metadata = Seurat::Idents(sys.small)[barcodes],col.name = 'SendingType') + # bug fix: add the Neighborhood - prefix + sending_type.meta <- data.frame(Seurat::Idents(sys.small)[barcodes]) + rownames(sending_type.meta) <- paste(rownames(sending_type.meta),"Neighborhood",sep = '—') + + demo <- Seurat::AddMetaData(demo,metadata = sending_type.meta,col.name = 'SendingType') # Gather and assemble additional metadata if (!is.null(meta.data.to.map)){ diff --git a/R/RunNeighborhoodToCell.R b/R/RunNeighborhoodToCell.R index 9a398ce..a768288 100644 --- a/R/RunNeighborhoodToCell.R +++ b/R/RunNeighborhoodToCell.R @@ -70,7 +70,11 @@ RunNeighborhoodToCell <- function(sys.small, # Add metadata based on ident slot demo <- Seurat::AddMetaData(demo,metadata = barcodes,col.name = 'ReceivingCell') - demo <- Seurat::AddMetaData(demo,metadata = Seurat::Idents(sys.small)[barcodes],col.name = 'ReceivingType') + # bug fix: add the Neighborhood - prefix + receiving_type.meta <- data.frame(Seurat::Idents(sys.small)[barcodes]) + rownames(receiving_type.meta) <- paste("Neighborhood",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)){ diff --git a/omnipathr-log/omnipathr-20231109-1646.log b/omnipathr-log/omnipathr-20231109-1646.log new file mode 100644 index 0000000..2f777fe --- /dev/null +++ b/omnipathr-log/omnipathr-20231109-1646.log @@ -0,0 +1,2 @@ +[2023-11-09 16:46:30] [INFO] [OmnipathR] Initialized cache: `/home/rstudio/.cache/OmnipathR`. +[2023-11-09 16:46:30] [INFO] [OmnipathR] Welcome to OmnipathR!