aertslab / SCopeLoomR

R package (compatible with SCope) to create generic .loom files and extend them with other data e.g.: SCENIC regulons, Seurat clusters and markers, ...
MIT License
38 stars 15 forks source link

Metadata Display #4

Closed sedjro closed 5 years ago

sedjro commented 5 years ago

Hi,

I have built a loom file with the last version of SCopeLoomR. When I add metadata to the loom file, I use this with "as.character":

add_col_attr(loom=loom, key = "sample", value=as.character(so@meta.data$sample), as.annotation=T)

The metadata is well displayed on SCope.

When I have tried without "as.character":

add_col_attr(loom=loom, key = "sample", value=so@meta.data$sample, as.annotation=T)

And tried to display it, I got this error message on the server:

Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/grpcio-1.16.0rc1-py3.6-linux-x86_64.egg/grpc/_server.py", line 390, in _call_behavior return behavior(argument, context), True File "/data/scope/SCope/opt/scopeserver/dataserver/modules/gserver/GServer.py", line 218, in getCellColorByFeatures cell_color_by_features.setAnnotationFeature(feature=feature) File "/data/scope/SCope/opt/scopeserver/utils/CellColorByFeatures.py", line 114, in setAnnotationFeature ca_annotation_as_int = list(map(lambda x: md_annotation_values.index(str(x)), ca_annotation)) File "/data/scope/SCope/opt/scopeserver/utils/CellColorByFeatures.py", line 114, in ca_annotation_as_int = list(map(lambda x: md_annotation_values.index(str(x)), ca_annotation)) ValueError: '2' is not in list

dweemx commented 5 years ago

This is fixed now in SCopeLoomR version 0.5.0 (see 94ca82f9627bde464b030bfd961ef8bc0fcbc830)