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
104 stars 40 forks source link

assert(len(newName)!=0) when there is only one cluster in dataset. #195

Closed luyang93 closed 3 years ago

luyang93 commented 3 years ago

I have annotated the subcluster of the dataset. Fortunately, there is only one cell type in the subcluter.It means that there is only one cluster in RDS file. When I run cbBuild command, it raise the error assert(len(newName)!=0) in https://github.com/maximilianh/cellBrowser/blob/3e4b91dbd12a2ba0da186928f9e928167a9ed43a/src/cbPyLib/cellbrowser/cellbrowser.py#L2454 Meanwhile, the meta.tsv file doesn't have a cluster column.

Finally, I mannually change one cell to a new cell type, it works well.

maximilianh commented 3 years ago

Yes, this is related to the header of your meta.tsv file or the column name in your Seurat object. I can improve this error message or add something to make headers more unique.... Do you know what the headers of your meta.tsv are? You can get them with "head -n1 meta.tsv" in your output directory.

On Fri, Oct 30, 2020 at 1:16 PM luyang93 notifications@github.com wrote:

I have annotated the subcluster of the dataset. Fortunately, there is only one cell type in the subcluter.It means that there is only one cluster in RDS file. When I run cbBuild command, it raise the error assert(len(newName)!=0) in https://github.com/maximilianh/cellBrowser/blob/3e4b91dbd12a2ba0da186928f9e928167a9ed43a/src/cbPyLib/cellbrowser/cellbrowser.py#L2454. Meanwhile, the meta.tsv file doesn't have cluster column.

Finally, I mannually change one cell to a new cell type, it works well.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TIIL7CRHWEM4N7O6LLSNKVC5ANCNFSM4TE45XXQ .

luyang93 commented 3 years ago

Cell nCount_RNA nFeature_RNA

luyang93 commented 3 years ago

The normal one is like Cell nCount_RNA nFeature_RNA Cluster

maximilianh commented 3 years ago

There may be a newline issue somewhere... This function takes each word of the first line (Cell, nCount_RNA and nFeature_RNA and Cluster) and removes all special characters. You could also run cbBuild with -d and send me the output, this looks like something simple to fix... we've never had this problem with headers like this before. We had this problem before when we had meta.tsv headers like "@@@###" or something like that

On Fri, Oct 30, 2020 at 3:01 PM luyang93 notifications@github.com wrote:

The normal one is like Cell nCount_RNA nFeature_RNA Cluster

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719569722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TNKOI2P2E7GLTZI7ADSNLBMBANCNFSM4TE45XXQ .

luyang93 commented 3 years ago
DEBUG:root:Processing cellbrowser.conf
DEBUG:root:Loading settings from cellbrowser.conf
INFO:root:dataRoot is not set in ~/.cellbrowser.conf or via $CBDATAROOT. Dataset hierarchies are not supported.
INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC
DEBUG:root:/PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is not an MTX file
INFO:root:Determining if /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz needs to be created
INFO:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz does not exist. Must build matrix now.
DEBUG:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json not found, assuming that meta data has to be recreated
DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv
DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv
DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv using md5sum command line tool
DEBUG:root:Cmd: ['md5sum', '/PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv']
INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC/metaFields
INFO:root:Checking and reordering meta data to /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv
INFO:root:Reading sample names from /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv
DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t'
DEBUG:root:Sanitizing 'Cell' -> Cell
DEBUG:root:Sanitizing 'nCount_RNA' -> nCount_RNA
DEBUG:root:Sanitizing 'nFeature_RNA' -> nFeature_RNA
DEBUG:root:Found 723 sample names, e.g. ['SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC', 'SQH09519_TCCCTGGGTAAT']
INFO:root:Reading headers from file /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz
DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is '\t'
DEBUG:root:Found 724 fields, e.g. ['gene', 'SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC']
INFO:root:Data contains 723 samples/cells
DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t'
DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv
INFO:root:Converting to numbers and compressing meta data fields
Traceback (most recent call last):
  File "/PATH/TO/DIR/conda_env/cellbrowser/bin/cbBuild", line 10, in <module>
    sys.exit(cbBuildCli())
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4553, in cbBuildCli
    build(confFnames, outDir, port, redo=options.redo)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4370, in build
    convertDataset(inDir, inConf, outConf, datasetDir, redo)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3727, in convertDataset
    sampleNames, needFilterMatrix = convertMeta(inDir, inConf, outConf, datasetDir, outMetaFname)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3397, in convertMeta
    fieldConf, validFieldNames = metaToBin(inConf, outConf, finalMetaFname, colorFname, metaDir, enumFields)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 1224, in metaToBin
    sanEnumFields = [sanitizeName(n) for n in enumFields]
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 1224, in <listcomp>
    sanEnumFields = [sanitizeName(n) for n in enumFields]
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 2454, in sanitizeName
    assert(len(newName)!=0)
AssertionError
maximilianh commented 3 years ago

Oh this is something entirely unrelated. I was completely wrong. Can you tell me what the value of the tag "enumFields" in your cellbrowser.conf?

On Fri, Oct 30, 2020 at 3:15 PM luyang93 notifications@github.com wrote:

DEBUG:root:Processing cellbrowser.conf DEBUG:root:Loading settings from cellbrowser.conf INFO:root:dataRoot is not set in ~/.cellbrowser.conf or via $CBDATAROOT. Dataset hierarchies are not supported. INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC DEBUG:root:/PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is not an MTX file INFO:root:Determining if /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz needs to be created INFO:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz does not exist. Must build matrix now. DEBUG:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json not found, assuming that meta data has to be recreated DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv using md5sum command line tool DEBUG:root:Cmd: ['md5sum', '/PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv'] INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC/metaFields INFO:root:Checking and reordering meta data to /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv INFO:root:Reading sample names from /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t' DEBUG:root:Sanitizing 'Cell' -> Cell DEBUG:root:Sanitizing 'nCount_RNA' -> nCount_RNA DEBUG:root:Sanitizing 'nFeature_RNA' -> nFeature_RNA DEBUG:root:Found 723 sample names, e.g. ['SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC', 'SQH09519_TCCCTGGGTAAT'] INFO:root:Reading headers from file /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is '\t' DEBUG:root:Found 724 fields, e.g. ['gene', 'SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC'] INFO:root:Data contains 723 samples/cells DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t' DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv INFO:root:Converting to numbers and compressing meta data fields Traceback (most recent call last): File "/PATH/TO/DIR/conda_env/cellbrowser/bin/cbBuild", line 10, in sys.exit(cbBuildCli()) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4553, in cbBuildCli build(confFnames, outDir, port, redo=options.redo) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4370, in build convertDataset(inDir, inConf, outConf, datasetDir, redo) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3727, in convertDataset sampleNames, needFilterMatrix = convertMeta(inDir, inConf, outConf, datasetDir, outMetaFname) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3397, in convertMeta fieldConf, validFieldNames = metaToBin(inConf, outConf, finalMetaFname, colorFname, metaDir, enumFields) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 1224, in metaToBin sanEnumFields = [sanitizeName(n) for n in enumFields] File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 1224, in sanEnumFields = [sanitizeName(n) for n in enumFields] File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 2454, in sanitizeName assert(len(newName)!=0) AssertionError

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719577529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TOPJK7735PU7OE7PC3SNLDAVANCNFSM4TE45XXQ .

maximilianh commented 3 years ago

I suspect that you have something like this in your cellbrowser.conf:

enumFields = ['']

On Fri, Oct 30, 2020 at 3:39 PM Maximilian Haeussler maximilianh@gmail.com wrote:

Oh this is something entirely unrelated. I was completely wrong. Can you tell me what the value of the tag "enumFields" in your cellbrowser.conf?

On Fri, Oct 30, 2020 at 3:15 PM luyang93 notifications@github.com wrote:

DEBUG:root:Processing cellbrowser.conf DEBUG:root:Loading settings from cellbrowser.conf INFO:root:dataRoot is not set in ~/.cellbrowser.conf or via $CBDATAROOT. Dataset hierarchies are not supported. INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC DEBUG:root:/PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is not an MTX file INFO:root:Determining if /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz needs to be created INFO:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz does not exist. Must build matrix now. DEBUG:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json not found, assuming that meta data has to be recreated DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv using md5sum command line tool DEBUG:root:Cmd: ['md5sum', '/PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv'] INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC/metaFields INFO:root:Checking and reordering meta data to /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv INFO:root:Reading sample names from /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t' DEBUG:root:Sanitizing 'Cell' -> Cell DEBUG:root:Sanitizing 'nCount_RNA' -> nCount_RNA DEBUG:root:Sanitizing 'nFeature_RNA' -> nFeature_RNA DEBUG:root:Found 723 sample names, e.g. ['SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC', 'SQH09519_TCCCTGGGTAAT'] INFO:root:Reading headers from file /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is '\t' DEBUG:root:Found 724 fields, e.g. ['gene', 'SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC'] INFO:root:Data contains 723 samples/cells DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t' DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv INFO:root:Converting to numbers and compressing meta data fields Traceback (most recent call last): File "/PATH/TO/DIR/conda_env/cellbrowser/bin/cbBuild", line 10, in sys.exit(cbBuildCli()) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4553, in cbBuildCli build(confFnames, outDir, port, redo=options.redo) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4370, in build convertDataset(inDir, inConf, outConf, datasetDir, redo) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3727, in convertDataset sampleNames, needFilterMatrix = convertMeta(inDir, inConf, outConf, datasetDir, outMetaFname) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3397, in convertMeta fieldConf, validFieldNames = metaToBin(inConf, outConf, finalMetaFname, colorFname, metaDir, enumFields) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 1224, in metaToBin sanEnumFields = [sanitizeName(n) for n in enumFields] File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 1224, in sanEnumFields = [sanitizeName(n) for n in enumFields] File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 2454, in sanitizeName assert(len(newName)!=0) AssertionError

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719577529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TOPJK7735PU7OE7PC3SNLDAVANCNFSM4TE45XXQ .

luyang93 commented 3 years ago

I forgot to mention that. In cellbrowser.conf, the line is enumFields=[""]

luyang93 commented 3 years ago

What should I do?

maximilianh commented 3 years ago

Yes, this line is the problem. Comment it out and the problem will be solved.

Did you add it yourself or did this line get created by my code?

On Fri, Oct 30, 2020 at 3:43 PM luyang93 notifications@github.com wrote:

I forgot that.

In cellbrowser.conf, the line is enumFields=[""].

在 2020/10/30 下午10:40, Maximilian Haeussler 写道:

I suspect that you have something like this in your cellbrowser.conf:

enumFields = ['']

On Fri, Oct 30, 2020 at 3:39 PM Maximilian Haeussler maximilianh@gmail.com wrote:

Oh this is something entirely unrelated. I was completely wrong. Can you tell me what the value of the tag "enumFields" in your cellbrowser.conf?

On Fri, Oct 30, 2020 at 3:15 PM luyang93 notifications@github.com wrote:

DEBUG:root:Processing cellbrowser.conf DEBUG:root:Loading settings from cellbrowser.conf INFO:root:dataRoot is not set in ~/.cellbrowser.conf or via $CBDATAROOT. Dataset hierarchies are not supported. INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC DEBUG:root:/PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is not an MTX file INFO:root:Determining if /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz needs to be created INFO:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz does not exist. Must build matrix now. DEBUG:root:/PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json not found, assuming that meta data has to be recreated DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv using md5sum command line tool DEBUG:root:Cmd: ['md5sum', '/PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv'] INFO:root:Creating /PATH/TO/DIR/cellbrowser/pubhtml/DC/metaFields INFO:root:Checking and reordering meta data to /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv INFO:root:Reading sample names from /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t' DEBUG:root:Sanitizing 'Cell' -> Cell DEBUG:root:Sanitizing 'nCount_RNA' -> nCount_RNA DEBUG:root:Sanitizing 'nFeature_RNA' -> nFeature_RNA DEBUG:root:Found 723 sample names, e.g. ['SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC', 'SQH09519_TCCCTGGGTAAT'] INFO:root:Reading headers from file /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/exprMatrix.tsv.gz is '\t' DEBUG:root:Found 724 fields, e.g. ['gene', 'SQH09519_CGCAAACGATAT', 'SQH09519_CACTTCCGTATC'] INFO:root:Data contains 723 samples/cells DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/celldata/DC/meta.tsv is '\t' DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv INFO:root:Converting to numbers and compressing meta data fields Traceback (most recent call last): File "/PATH/TO/DIR/conda_env/cellbrowser/bin/cbBuild", line 10, in

sys.exit(cbBuildCli()) File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 4553, in cbBuildCli

build(confFnames, outDir, port, redo=options.redo) File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 4370, in build

convertDataset(inDir, inConf, outConf, datasetDir, redo) File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 3727, in convertDataset

sampleNames, needFilterMatrix = convertMeta(inDir, inConf, outConf, datasetDir, outMetaFname) File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 3397, in convertMeta

fieldConf, validFieldNames = metaToBin(inConf, outConf, finalMetaFname, colorFname, metaDir, enumFields) File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 1224, in metaToBin

sanEnumFields = [sanitizeName(n) for n in enumFields] File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 1224, in

sanEnumFields = [sanitizeName(n) for n in enumFields] File

"/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py",

line 2454, in sanitizeName

assert(len(newName)!=0) AssertionError

— You are receiving this because you commented. Reply to this email directly, view it on GitHub

< https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719577529 , or unsubscribe

< https://github.com/notifications/unsubscribe-auth/AACL4TOPJK7735PU7OE7PC3SNLDAVANCNFSM4TE45XXQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719592204>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJKWLDCQVKUMIUFACCEOCLLSNLF7VANCNFSM4TE45XXQ .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719593817, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TLNA37JJVM3ABPJEBDSNLGJ5ANCNFSM4TE45XXQ .

luyang93 commented 3 years ago
DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.bin.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.bin
DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/discretMat.bin.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/discretMat.bin
DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz
DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz
DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz using md5sum command line tool
DEBUG:root:Cmd: ['md5sum', '/PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz']
DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak
INFO:root:Wrote /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak
DEBUG:root:Wrote backup config /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak
DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json
INFO:root:Wrote /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json
INFO:root:Wrote main config /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json
INFO:root:Parsing column Cluster from /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv
DEBUG:root:Parsing column Cluster from file /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv
DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv is '\t'
Traceback (most recent call last):
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 710, in parseOneColumn
    colIdx = row.index(colName)
ValueError: 'Cluster' is not in list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/PATH/TO/DIR/conda_env/cellbrowser/bin/cbBuild", line 10, in <module>
    sys.exit(cbBuildCli())
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4553, in cbBuildCli
    build(confFnames, outDir, port, redo=options.redo)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4370, in build
    convertDataset(inDir, inConf, outConf, datasetDir, redo)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3744, in convertDataset
    coordFiles, clusterLabels = convertCoords(inConf, outConf, sampleNames, outMetaFname, datasetDir)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3177, in convertCoords
    labelVec, labelVals = parseTsvColumn(outMeta, clusterLabelField)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 2876, in parseTsvColumn
    vals = parseOneColumn(fname, colName)
  File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 713, in parseOneColumn
    raise Exception("There is no column %s in the file %s. This may have to do with special characters in the column name. Try not to use special characters in column names, fix meta.tsv and cellbrowser.conf and try again. It can also happen if you reference a field in cellbrowser.conf that has been excluded from the meta data because it only has a single value. Possible row names: %s" % (repr(colName), fname, row))
Exception: There is no column 'Cluster' in the file /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv. This may have to do with special characters in the column name. Try not to use special characters in column names, fix meta.tsv and cellbrowser.conf and try again. It can also happen if you reference a field in cellbrowser.conf that has been excluded from the meta data because it only has a single value. Possible row names: ['Cell', 'nCount_RNA', 'nFeature_RNA']
maximilianh commented 3 years ago

Hi, sorry for the late reply, yes, it looks like you specified "Cluster" somewhere in your cellbrowser.conf but your meta data file meta.tsv does not have a field with this name... can you send us the whole cellbrowser.conf ? Or comment out the lines where "Cluster" is specified?

On Fri, Oct 30, 2020 at 4:27 PM luyang93 notifications@github.com wrote:

DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.bin.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.bin DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/discretMat.bin.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/discretMat.bin DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz DEBUG:root:Getting md5 of /PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz using md5sum command line tool DEBUG:root:Cmd: ['md5sum', '/PATH/TO/DIR/cellbrowser/pubhtml/DC/exprMatrix.tsv.gz'] DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak INFO:root:Wrote /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak DEBUG:root:Wrote backup config /PATH/TO/DIR/cellbrowser/pubhtml/DC/cellbrowser.json.bak DEBUG:root:Renaming /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json.tmp -> /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json INFO:root:Wrote /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json INFO:root:Wrote main config /PATH/TO/DIR/cellbrowser/pubhtml/DC/dataset.json INFO:root:Parsing column Cluster from /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv DEBUG:root:Parsing column Cluster from file /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv DEBUG:root:Separator for /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv is '\t' Traceback (most recent call last): File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 710, in parseOneColumn colIdx = row.index(colName) ValueError: 'Cluster' is not in list

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/PATH/TO/DIR/conda_env/cellbrowser/bin/cbBuild", line 10, in sys.exit(cbBuildCli()) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4553, in cbBuildCli build(confFnames, outDir, port, redo=options.redo) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 4370, in build convertDataset(inDir, inConf, outConf, datasetDir, redo) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3744, in convertDataset coordFiles, clusterLabels = convertCoords(inConf, outConf, sampleNames, outMetaFname, datasetDir) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 3177, in convertCoords labelVec, labelVals = parseTsvColumn(outMeta, clusterLabelField) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 2876, in parseTsvColumn vals = parseOneColumn(fname, colName) File "/PATH/TO/DIR/conda_env/cellbrowser/lib/python3.9/site-packages/cellbrowser/cellbrowser.py", line 713, in parseOneColumn raise Exception("There is no column %s in the file %s. This may have to do with special characters in the column name. Try not to use special characters in column names, fix meta.tsv and cellbrowser.conf and try again. It can also happen if you reference a field in cellbrowser.conf that has been excluded from the meta data because it only has a single value. Possible row names: %s" % (repr(colName), fname, row)) Exception: There is no column 'Cluster' in the file /PATH/TO/DIR/cellbrowser/pubhtml/DC/meta.tsv. This may have to do with special characters in the column name. Try not to use special characters in column names, fix meta.tsv and cellbrowser.conf and try again. It can also happen if you reference a field in cellbrowser.conf that has been excluded from the meta data because it only has a single value. Possible row names: ['Cell', 'nCount_RNA', 'nFeature_RNA']

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-719620231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TNICZUZBQL52SWOOLLSNLLNZANCNFSM4TE45XXQ .

luyang93 commented 3 years ago

RDS struct

> DC_annot
An object of class Seurat 
20372 features across 723 samples within 1 assay 
Active assay: RNA (20372 features, 2000 variable features)
 3 dimensional reductions calculated: pca, umap, tsne
> 
> table(DC_annot@active.ident)

cDC2 
 723 

cellbrowser.conf

name="DC_annot"
shortLabel="DC_annot"
exprMatrix="exprMatrix.tsv.gz"
#tags = ["10x", "smartseq2"]
meta="meta.tsv"
# possible values: "gencode-human", "gencode-mouse", "symbol" or "auto"
geneIdType="auto"
clusterField="Cluster"
labelField="Cluster"
enumFields=[""]

coords=[{"file": "tsne.coords.tsv", "shortLabel": "Seurat tsne"},

If you need, I can send the RDS file to you.

maximilianh commented 3 years ago

Yes, I cannot see the meta data in your seurat object. Are you sure that the object includes a cluster-like meta data field? If you want, you can send a link to the RDS file to cells@ucsc.edu (private email) and we can have a look at it.

On Tue, Nov 17, 2020 at 4:38 AM luyang93 notifications@github.com wrote:

RDS struct

DC_annot An object of class Seurat 20372 features across 723 samples within 1 assay Active assay: RNA (20372 features, 2000 variable features) 3 dimensional reductions calculated: pca, umap, tsne

table(DC_annot@active.ident)

cDC2 723

cellbrowser.conf

name="DC_annot" shortLabel="DC_annot" exprMatrix="exprMatrix.tsv.gz"

tags = ["10x", "smartseq2"]

meta="meta.tsv"

possible values: "gencode-human", "gencode-mouse", "symbol" or "auto"

geneIdType="auto" clusterField="Cluster" labelField="Cluster" enumFields=[""]

coords=[{"file": "tsne.coords.tsv", "shortLabel": "Seurat tsne"},

If you need, I can send the RDS file to you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/195#issuecomment-728665909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TJIVIESWRFGWJTTVD3SQHV45ANCNFSM4TE45XXQ .

maximilianh commented 3 years ago

I think we solved this back last year. Feel free to re-open the ticket if there if you encounter something like this before.