dpeerlab / Palantir

Single cell trajectory detection
https://palantir.readthedocs.io
GNU General Public License v2.0
226 stars 52 forks source link

findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans. #117

Closed zhouzhendiao closed 1 year ago

zhouzhendiao commented 1 year ago

There were some closed font issue #55 #105 , however this warnnings still exist in version 1.3.0.

url = "https://dp-lab-data-public.s3.amazonaws.com/palantir/marrow_sample_scseq_counts.h5ad"
adata = sc.read('marrow_sample_scseq_counts.h5ad', backup_url=url)
# normalization
sc.pp.normalize_per_cell(adata)
sc.pp.log1p(adata)
# highly variable gene
sc.pp.highly_variable_genes(adata, n_top_genes=1500, flavor='cell_ranger')
# PCA
sc.pp.pca(adata)
# diffusion maps
dm_res = palantir.utils.run_diffusion_maps(adata, n_components=5)
ms_data = palantir.utils.determine_multiscale_space(adata)
# umap
sc.pp.neighbors(adata)
sc.tl.umap(adata)
# MAGIC imputation
imputed_X = palantir.utils.run_magic_imputation(adata)
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Lato'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
findfont: Font family ['Raleway'] not found. Falling back to DejaVu Sans.
...
sc.pl.umap(adata, layer='MAGIC_imputed_data', color=['CD34', 'MPO', 'GATA1', 'IRF8'])
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.
findfont: Font family 'Bitstream Vera Sans' not found.

Version:

-----
anndata     0.9.2
scanpy      1.9.3
-----
PIL                 9.5.0
anyio               NA
arrow               1.2.3
asttokens           NA
attr                22.2.0
awkward             2.3.1
awkward_cpp         NA
babel               2.12.1
backcall            0.2.0
beta_ufunc          NA
binom_ufunc         NA
bottleneck          1.3.7
cairo               1.24.0
certifi             2023.07.22
cffi                1.15.1
charset_normalizer  3.1.0
cloudpickle         2.2.1
colorama            0.3.9
comm                0.1.3
cycler              0.10.0
cython_runtime      NA
cytoolz             0.12.0
dask                2023.4.1
dateutil            2.8.2
debugpy             1.6.7
decorator           5.1.1
defusedxml          0.7.1
dill                0.3.6
etils               1.4.1
executing           1.2.0
fastjsonschema      NA
fcsparser           0.2.6
fqdn                NA
gi                  3.44.1
gio                 NA
glib                NA
gmpy2               2.1.2
gobject             NA
google              NA
gtk                 NA
h5py                3.8.0
hypergeom_ufunc     NA
idna                3.4
igraph              0.10.4
importlib_resources NA
invgauss_ufunc      NA
ipykernel           6.22.0
ipython_genutils    0.2.0
ipywidgets          8.0.6
isoduration         NA
jax                 0.4.14
jaxlib              0.4.14
jaxopt              NA
jedi                0.18.2
jinja2              3.1.2
joblib              1.2.0
json5               NA
jsonpointer         2.0
jsonschema          4.17.3
jupyter_events      0.5.0
jupyter_server      2.5.0
jupyterlab_server   2.22.1
kiwisolver          1.4.4
leidenalg           0.10.0
llvmlite            0.40.1
lz4                 4.3.2
markupsafe          2.1.2
matplotlib          3.7.1
matplotlib_inline   0.1.6
mellon              1.3.1
ml_dtypes           0.2.0
mpl_toolkits        NA
mpmath              1.3.0
natsort             8.4.0
nbformat            5.8.0
nbinom_ufunc        NA
ncf_ufunc           NA
nct_ufunc           NA
ncx2_ufunc          NA
networkx            3.1
numba               0.57.1
numexpr             2.8.4
numpy               1.24.4
nvfuser             NA
opt_einsum          v3.3.0
packaging           23.1
palantir            1.3.0
pandas              1.5.3
parso               0.8.3
patsy               0.5.3
pexpect             4.8.0
pickleshare         0.7.5
pkg_resources       NA
platformdirs        3.5.0
progressbar         4.2.0
prometheus_client   NA
prompt_toolkit      3.0.38
psutil              5.9.5
ptyprocess          0.7.0
pure_eval           0.2.2
pvectorc            NA
pyarrow             11.0.0
pycparser           2.21
pydev_ipython       NA
pydevconsole        NA
pydevd              2.9.5
pydevd_file_utils   NA
pydevd_plugins      NA
pydevd_tracing      NA
pygam               0.8.0
pygments            2.15.1
pynndescent         0.5.10
pyparsing           3.0.9
pyrsistent          NA
python_utils        NA
pythonjsonlogger    NA
pytz                2023.3
requests            2.29.0
rfc3339_validator   0.1.4
rfc3986_validator   0.1.1
rich                NA
ruamel              NA
scipy               1.10.1
seaborn             0.12.2
send2trash          NA
session_info        1.0.0
setuptools          67.7.2
setuptools_scm      NA
six                 1.16.0
skewnorm_ufunc      NA
sklearn             1.1.3
sniffio             1.3.0
socks               1.7.1
sparse              0.14.0
stack_data          0.6.2
statsmodels         0.14.0
sympy               1.11.1
tblib               1.7.0
texttable           1.6.7
threadpoolctl       3.1.0
tlz                 0.12.0
toolz               0.12.0
torch               2.0.1+cu117
tornado             6.3
tqdm                4.65.0
traitlets           5.9.0
typing_extensions   NA
umap                0.5.3
uri_template        NA
urllib3             1.23
wcwidth             0.2.6
webcolors           1.13
websocket           1.5.1
yaml                6.0
zipp                NA
zmq                 25.0.2
zoneinfo            NA
zstandard           0.19.0
-----
IPython             8.13.1
jupyter_client      8.2.0
jupyter_core        5.3.0
jupyterlab          3.6.3
notebook            6.5.4
-----
Python 3.10.10 | packaged by conda-forge | (main, Mar 24 2023, 20:08:06) [GCC 11.3.0]
Linux-3.10.0-1160.81.1.el7.x86_64-x86_64-with-glibc2.35
-----
Session information updated at 2023-08-16 05:27
katosh commented 1 year ago

Hi @zhouzhendiao! Thank you for the report! The custom font import was removed along with the seaborn dependency in cfc1a2dddf46a433124ddb301d07dde4717357de. This commit, however, is not part of a release yet so you would have to

pip install 'git+https://github.com/dpeerlab/Palantir'

to get the patched version. Please let me know if this fixes the issue!

zhouzhendiao commented 1 year ago

Hi, @katosh. This patch fixed the issue. Thanks for you effort!