Single cell spatial mapping method DSTG

To run DSTG, you first need to import the library

After doing this, I found that it was because there was a big problem with the version of the library. The requirements in the requirements are all the original libraries. The versions are as follows. You need to check the versions one by one. It is best to create a new environment networkx
.2.2
scipy
1.1.0
setuptools40.6.3
numpy
1.15.4
tensorflow==1.15.2

I still encountered a lot of problems in configuring the environment. I tried 3.6 here, but it didn’t feel good because when I tried to pandas, a chinamap import failed, so

Now it is an attempt on 3.7
conda install tensorflow -y
conda install scipy==1.1.0 -y
conda install jupyter notebook -y
conda install ipykernel -y
conda install networkx -y
conda install sklearn -y
The version is not specified here, it should be written as Run together in one line.
Here you need to write the configured environment into it.

python -m ipykernel install --user --name=DSTG-env2 --display-name=‘Environment (DSTG-env2)’

  1. Some library versions have been upgraded. For example, tensorflow requires this line of code to change the version.
// tf版本不对的问题,会有app报错
import tensorflow.compat.v1 as tf
  1. Utils are not downloaded from pyhton. You need to enter the DSTG directory to read them.
// 这里会用到os模块,需要更改路径读取
import os
os.getcwd()
os.chdir('/home/shpc_100862/xyh_desktop/DSTG/DSTG-main/DSTG/')

3. Changes of tf parameters

// 会报错没有f
tf.app.flags.DEFINE_string('f', '', 'kernel')

Guess you like

Origin blog.csdn.net/coffeeii/article/details/126813829