You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm recently new to PAGA and thanks so much for developing this wonderful tool! I was following the tutorials (the official and some other tutorials elsewhere), but could not reproduce the figure where the ForceAtlas2 algorithm was used to visualize the data in low-dimensional space.
The warning message said:
drawing single-cell graph using layout 'fa'
WARNING: Package 'fa2' is not installed, falling back to layout 'fr'.To use the faster and better ForceAtlas2 layout, install package 'fa2' (`pip install fa2`).
finished: added
'X_draw_graph_fr', graph_drawing coordinates (adata.obsm) (0:00:04)
I tried to follow the instruction, but could not successfully install the fa2 package (even after installing/updating additional dependency packages such as setuptools). I realized that this has been repetitively discussed in the original ForceAtlas2 repository (such as here). Indeed many people (not only in the bioinformatics field but also the others) encountered the very same problem.
(My environment is macOS, mamba virtual environment, Python 3.11, Scanpy 1.10, but these do not matter so much, as I show below.)
An alternative was to use a modified version by the community, called the fa2_modified. I installed it by
pip install -U fa2_modified
(Probably can be installed via conda-forge as well)
Having this installed does not automatically replace the use of fa2 in PAGA, so I additionally went to manually modify the tools/_draw_graph.py script in the Scanpy package installed in my virtual environment (line 138):
# see whether fa2 is installed
if layout == "fa":
try:
#from fa2 import ForceAtlas2
from fa2_modified import ForceAtlas2
except ImportError:
logg.warning(
"Package 'fa2' is not installed, falling back to layout 'fr'."
"To use the faster and better ForceAtlas2 layout, "
"install package 'fa2' (`pip install fa2`)."
)
layout = "fr"
After replacing the fa2 with fa2_modified, which is much easier to install, now I can run the ForceAtlas2 layout with PAGA, and reproduce the same result shown in the tutorial.
Hope this can help the team and the community improve the tool.
Best,
Jason Leong.
The text was updated successfully, but these errors were encountered:
Dear developers of
PAGA
,I'm recently new to
PAGA
and thanks so much for developing this wonderful tool! I was following the tutorials (the official and some other tutorials elsewhere), but could not reproduce the figure where theForceAtlas2
algorithm was used to visualize the data in low-dimensional space.The warning message said:
I tried to follow the instruction, but could not successfully install the
fa2
package (even after installing/updating additional dependency packages such assetuptools
). I realized that this has been repetitively discussed in the originalForceAtlas2
repository (such as here). Indeed many people (not only in the bioinformatics field but also the others) encountered the very same problem.(My environment is macOS, mamba virtual environment, Python 3.11,
Scanpy
1.10, but these do not matter so much, as I show below.)An alternative was to use a modified version by the community, called the
fa2_modified
. I installed it by(Probably can be installed via
conda-forge
as well)Having this installed does not automatically replace the use of
fa2
inPAGA
, so I additionally went to manually modify thetools/_draw_graph.py
script in theScanpy
package installed in my virtual environment (line 138):After replacing the
fa2
withfa2_modified
, which is much easier to install, now I can run the ForceAtlas2 layout with PAGA, and reproduce the same result shown in the tutorial.Hope this can help the team and the community improve the tool.
Best,
Jason Leong.
The text was updated successfully, but these errors were encountered: