Closed Ankita-1211 closed 3 years ago
Hi @Ankita-1211, This error is caused by the metric being encoded as bytes instead of strings. Easiest option to solve your problem would be to delete the line umap_metric,correlation
from your file as correlation is the default metric in use.
How about if I want to change correlation to any other method as given in this page https://umap-learn.readthedocs.io/en/latest/parameters.html#metric? How do we pass that in this csv file.
Hi @Ankita-1211, This error is caused by the metric being encoded as bytes instead of strings. Easiest option to solve your problem would be to delete the line
umap_metric,correlation
from your file as correlation is the default metric in use.
How about if I want to change correlation to any other method as given in this page https://umap-learn.readthedocs.io/en/latest/parameters.html#metric? How do we pass that in this csv file.
If you'd like to use another option, the easiest path will be to edit the code to prevent it from being converted to binary.
If you open up the file /home/ec2-user/tools/cellranger-6.0.1/lib/python/cellranger/analysis/lm_umap.py
and change line 53 so that metric = metric.encode("utf-8")
is converted to metric = metric
(delete the encode method call).
Hi
I am trying to run cellranger reanalyze pipeline with my --params .
I am passing giving below arguments in my CSV file
num_principal_comps,10 cbc_knn,10 cbc_alpha,0.1 cbc_sigma,150 cbc_realign_panorama,FALSE graphclust_neighbors,0 neighbor_a,-230 neighbor_b,120 max_clusters,10 tsne_perplexity,30 tsne_theta,0.5 tsne_max_dims,2 tsne_max_iter,1000 tsne_stop_lying_iter,250 tsne_mom_switch_iter,250 umap_n_neighbors,30 umap_max_dims,2 umap_min_dist,0.3 umap_metric,correlation random_seed,0
but I am getting error or umap_metric argument which says
[error] Pipestance failed. Error log at: reanalyze_out/SC_RNA_REANALYZER_CS/SC_RNA_ANALYZER/RUN_UMAP/fork0/chnk0-u21f5dabd90/_errors
Log message: Traceback (most recent call last): File "/home/ec2-user/tools/cellranger-6.0.1/lib/python/cellranger/analysis/lm_umap.py", line 70, in run_umap transformed_umap_matrix = umap_reducer.fit_transform(transformed_pcamatrix) File "/home/ec2-user/tools/cellranger-6.0.1/external/anaconda/lib/python3.7/site-packages/umap/umap.py", line 1596, in fittransform self.fit(X, y) File "/home/ec2-user/tools/cellranger-6.0.1/external/anaconda/lib/python3.7/site-packages/umap/umap.py", line 1373, in fit self._validateparameters() File "/home/ec2-user/tools/cellranger-6.0.1/external/anaconda/lib/python3.7/site-packages/umap/umap.py", line 1307, in _validate_parameters raise ValueError("metric must be string or callable") ValueError: metric must be string or callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/ec2-user/tools/cellranger-6.0.1/external/martian/adapters/python/martian_shell.py", line 659, in _main stage.main() File "/home/ec2-user/tools/cellranger-6.0.1/external/martian/adapters/python/martian_shell.py", line 618, in main self._run(lambda: self._module.main(args, outs)) File "/home/ec2-user/tools/cellranger-6.0.1/external/martian/adapters/python/martian_shell.py", line 589, in _run cmd() File "/home/ec2-user/tools/cellranger-6.0.1/external/martian/adapters/python/martian_shell.py", line 618, in
self._run(lambda: self._module.main(args, outs))
File "/home/ec2-user/tools/cellranger-6.0.1/mro/rna/stages/analyzer/run_umap/init.py", line 142, in main
random_state=args.random_seed,
File "/home/ec2-user/tools/cellranger-6.0.1/lib/python/cellranger/analysis/lm_umap.py", line 85, in run_umap
transformed_umap_matrix = umap_reducer.fit_transform(transformed_pcamatrix)
File "/home/ec2-user/tools/cellranger-6.0.1/external/anaconda/lib/python3.7/site-packages/umap/umap.py", line 1596, in fittransform
self.fit(X, y)
File "/home/ec2-user/tools/cellranger-6.0.1/external/anaconda/lib/python3.7/site-packages/umap/umap.py", line 1373, in fit
self._validateparameters()
File "/home/ec2-user/tools/cellranger-6.0.1/external/anaconda/lib/python3.7/site-packages/umap/umap.py", line 1307, in _validate_parameters
raise ValueError("metric must be string or callable")
ValueError: metric must be string or callable
Waiting 6 seconds for UI to do final refresh. Pipestance failed. Use --noexit option to keep UI running after failure.
Shutting down.
could you please guide how to pass this particular argument.in csv file for reanalyzed analysis?