maximilianh / cellBrowser

main repo: https://github.com/ucscGenomeBrowser/cellBrowser/ - Python pipeline and Javascript scatter plot library for single-cell datasets, http://cellbrowser.rtfd.org
https://github.com/ucscGenomeBrowser/cellBrowser/
GNU General Public License v3.0
102 stars 40 forks source link

Special characters in the column names #249

Closed AmelZulji closed 2 years ago

AmelZulji commented 2 years ago

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

maximilianh commented 2 years ago

Thanks I made this change in the docs.