maximilianh/cellBrowser

Special characters in the column names

AmelZulji opened this issue · 1 comments

Hi Max,

In the following code featured for loading Seurat objects (https://cellbrowser.readthedocs.io/en/master/load.html):

require(Seurat)
require(data.table)
setwd("adultPancreas")
mat <- fread("exprMatrix.tsv.gz")
meta <- read.table("meta.tsv", header=T, sep="\t", as.is=T, row.names=1)
genes = mat[,1][[1]]
genes = gsub(".+[|]", "", genes)
mat = data.frame(mat[,-1], row.names=genes)
so <- CreateSeuratObject(counts = mat, project = "adultPancreas", meta.data=meta)

The line: mat = data.frame(mat[,-1], row.names=genes) replaces special characters from column names. Perhaps including argument check.names = FALSE is an option??

Regards,
Amel

Thanks I made this change in the docs.