Hi thanks for your quick reply.
1) There are many UI interfaces for utilities like "InspectHDF5" and "ViewRandomSubset {}" that are not available in Tools (not available in other notebooks). Are these local to this notebook?
In particular, i'm curious about the "LoadFunctions{}" block. It is described as "This next cell will load all the functions that support the UI cells you see throughout the notebook.". Does this mean that visualizations only work in this particular notebook, because of these special functoins? And does this mean that the ScanpyUtilities tool on it's own, does not do any visualiztions?
2) My notebook failed with many errors at the very start, at the "SetupPythonEnvironment {}" and "SetupREnvironment { }" steps. Here are the errors:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-86-a33f4a156d3e> in <module>
1 import nbtools
----> 2 nbtools.tool(id="SetupPythonEnvironment", origin="Notebook").function_or_method()
<ipython-input-9-76498f5a72ed> in SetupPythonEnvironment()
36
37 def SetupPythonEnvironment():
---> 38 assert(checkVersion(sc, (1,4)))
39 print("scanpy package is up to date")
40 assert(checkVersion(anndata, (0,6,18)))
<ipython-input-9-76498f5a72ed> in checkVersion(pkg, targetVersion)
28 # function that checks that the pacakge version is greater or equal to the target
29 def checkVersion(pkg, targetVersion):
---> 30 pkgVersion = [int(i) for i in pkg.__version__.split('.')]
31 while len(targetVersion) < len(pkgVersion):
32 targetVersion += (0,)
<ipython-input-9-76498f5a72ed> in <listcomp>(.0)
28 # function that checks that the pacakge version is greater or equal to the target
29 def checkVersion(pkg, targetVersion):
---> 30 pkgVersion = [int(i) for i in pkg.__version__.split('.')]
31 while len(targetVersion) < len(pkgVersion):
32 targetVersion += (0,)
ValueError: invalid literal for int() with base 10: 'post1'
SetupREnvironment {} Error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-87-5aa16e572863> in <module>
1 import nbtools
----> 2 nbtools.tool(id="SetupREnvironment", origin="Notebook").function_or_method()
<ipython-input-10-1f852148e973> in SetupREnvironment()
13 get_ipython().run_line_magic('R', 'if (!packageInstalled("BiocManager")) install.packages("BiocManager", lib="~/Rpackages")')
14 get_ipython().run_line_magic('R', 'if (!packageInstalled("Matrix")) BiocManager::install("Matrix", ask=FALSE, update=FALSE, lib="~/Rpackages")')
---> 15 get_ipython().run_line_magic('R', 'if (!packageInstalled("rhdf5")) BiocManager::install("rhdf5", ask=FALSE, update=FALSE, lib="~/Rpackages")')
16 get_ipython().run_line_magic('R', 'if (!packageInstalled("dunn.test")) BiocManager::install("dunn.test", ask=FALSE, update=FALSE, lib="~/Rpackages")')
17
/opt/conda/envs/python3.7/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2312 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2313 with self.builtin_trap:
-> 2314 result = fn(*args, **kwargs)
2315 return result
2316
</opt/conda/envs/python3.7/lib/python3.7/site-packages/decorator.py:decorator-gen-366> in R(self, line, cell, local_ns)
/opt/conda/envs/python3.7/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/opt/conda/envs/python3.7/lib/python3.7/site-packages/rpy2/ipython/rmagic.py in R(self, line, cell, local_ns)
730 if result is not ri.NULL:
731 if args.converter is None:
--> 732 return converter.ri2py(result)
733 else:
734 return localconverter.ri2py(result)
/opt/conda/envs/python3.7/lib/python3.7/functools.py in wrapper(*args, **kw)
825 '1 positional argument')
826
--> 827 return dispatch(args[0].__class__)(*args, **kw)
828
829 funcname = getattr(func, '__name__', 'singledispatch function')
/opt/conda/envs/python3.7/lib/python3.7/site-packages/rpy2/robjects/pandas2ri.py in ri2py_vector(obj)
123 @ri2py.register(SexpVector)
124 def ri2py_vector(obj):
--> 125 res = numpy2ri.ri2py(obj)
126 return res
127
/opt/conda/envs/python3.7/lib/python3.7/functools.py in wrapper(*args, **kw)
825 '1 positional argument')
826
--> 827 return dispatch(args[0].__class__)(*args, **kw)
828
829 funcname = getattr(func, '__name__', 'singledispatch function')
/opt/conda/envs/python3.7/lib/python3.7/site-packages/rpy2/robjects/numpy2ri.py in ri2py_sexp(obj)
151 def ri2py_sexp(obj):
152 if (obj.typeof in _vectortypes) and (obj.typeof != VECSXP):
--> 153 res = numpy.asarray(obj)
154 else:
155 res = ro.default_converter.ri2py(obj)
/opt/conda/envs/python3.7/lib/python3.7/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order)
83
84 """
---> 85 return array(a, dtype, copy=False, order=order)
86
87
ValueError: Buffer for this type not yet supported.