FAQ.Rmd
When running scVelo-related functions in RStudio on a Linux system, you might encounter an error similar to this:
Error in py_run_string_impl(code, local, convert) :
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/username/.local/share/r-miniconda/envs/seuratextend/lib/python3.10/site-packages/pandas/_libs/window/aggregations.cpython-310-x86_64-linux-gnu.so)
This error occurs because RStudio can’t find the correct shared library ‘libstdc++’. Even though a higher version of libstdc++.so.6.0.32 exists in the ‘seuratextend’ conda environment, RStudio can’t locate it.
RStudio searches for shared libraries in the paths specified by the
LD_LIBRARY_PATH
environment variable. You can check these
paths with:
Sys.getenv("LD_LIBRARY_PATH")
To resolve this issue, manually copy the following files from
/home/username/.local/share/r-miniconda/envs/seuratextend/lib/
to one of the paths in LD_LIBRARY_PATH
(e.g.,
/usr/lib/R/lib
, which may require sudo permissions):
After copying these files, restart your R session, and the issue should be resolved.
create_condaenv_seuratextend()
function is
failing to create the ‘seuratextend’ conda environment. What could be
the problem?
If create_condaenv_seuratextend()
is failing to create
the ‘seuratextend’ conda environment, it might be due to the system not
finding conda or git.
If conda is not found, you can install miniconda using:
reticulate::install_miniconda()
If git is not found, download and install it from the official website: https://git-scm.com/. Choose the appropriate version for your operating system.
After installing conda or git, restart your R session and try running
create_condaenv_seuratextend()
again.
merge()
function in Seurat v5.0, I’m getting an error when running certain
functions. How can I fix this?
When using Seurat v5.0, you might encounter the following error after merging multiple samples and trying to run certain functions:
Error in `GetAssayData()`:
! GetAssayData doesn't work for multiple layers in v5 assay.
This error occurs because in Seurat v5.0, the merge()
function creates separate count layers for each sample by default. This
prevents GetAssayData()
from extracting the matrix.