很久没有这么大体量的搞过数据了。
最近在整理cellbin,真的整的我心累。
一般情况下是直接创建conda 环境,然后写一大堆模型和函数,你在这个环境里面使用就行。
这个cellbin是先写一个环境,然后在这个环境里面运行写好的脚本。
其实是差不多的,但是具体用起来就是一大堆问题。
所以记录一下吧。
1、先说安装。试了很多个版本创建环境,最后选择直接下载编译好的。最方便。
#直接下载
#Create the target directory,新的环境
mkdir -p /path/to/extract/anaconda/envs/cellbin2
#Extract the package,解压缩到新环境
tar -xzvf /path/to/cellbin2_env_linux.tar.gz -C "/path/to/anaconda/envs/cellbin2"
2、激活环境,检查是不是完整。
Activate the environment
conda activate cellbin2
Verify the environment
python --version
conda list #If everything is correct, you should see all dependencies of this environment.
#Enter Python interactive shell(python界面)
import onnxruntime
print(onnxruntime.get_available_providers())
#Expected result (contains CUDAExecutionProvider)
['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
3、下载所有可用脚本。即可使用demo了
这里运行脚本一定要在cellbin2这个环境里面。
# Clone the repository
git clone https://github.com/STOmics/cellbin2
# Install package dependencies
cd cellbin2
# Execute the demo (takes ~30-40 minutes on GPU hardware)
python demo.py
4、这里具体使用参数。
#Case 1:Stereo-seq_T_FF
#ssDNA
CUDA_VISIBLE_DEVICES=0 python cellbin2/cellbin_pipeline.py \
-c SN \
-i SN.tif \
-s ssDNA \
-m SN.raw.gef \
-o test/SN \
-k "Stereo-seq_T_FF_V1.2"












网友评论