【问题标题】:How do I create a virtual environment for BiG-SCAPE in Google Colab using Conda? [closed]如何使用 Conda 在 Google Colab 中为 BiG-SCAPE 创建虚拟环境? [关闭]
【发布时间】:2020-10-06 15:23:19
【问题描述】:

我想在 Google Colab 中使用 BiG-SCAPE (https://git.wageningenur.nl/medema-group/BiG-SCAPE/-/wikis/home)。如何设置并运行示例?

【问题讨论】:

    标签: ubuntu anaconda google-colaboratory bioinformatics virtual-environment


    【解决方案1】:

    您必须先安装 Anaconda。

    以下命令将创建一个虚拟环境并将 BiG-SCAPE 安装到其中:

    %%shell
    eval "$(conda shell.bash hook)" # copy conda command to shell
    
    # Create virtual environment for BiG-SCAPE, then install dependencies, BiG-SCAPE, and databases into it (this will take a while)
    conda create --prefix /usr/local/envs/bigscape python==3.6 -y
    conda install --name bigscape hmmer biopython mafft fasttree networkx numpy scipy scikit-learn=0.19.1 -y
    conda activate bigscape
    
    # Clone BiG-SCAPE from Git and install in virtual environment
    cd /usr/local/envs/bigscape
    git clone https://git.wur.nl/medema-group/BiG-SCAPE.git
    
    # Download Pfam database and check that everything was installed properly
    cd BiG-SCAPE
    mkdir -p databases
    cd databases
    wget ftp://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam32.0/Pfam-A.hmm.gz && gunzip Pfam-A.hmm.gz 
    hmmpress Pfam-A.hmm
    
    # Check that everything was installed correctly
    cd ..
    python bigscape.py --version
    conda deactivate
    

    以下命令将下载示例数据集并在其上运行 BiG-SCAPE:

    %%shell
    eval "$(conda shell.bash hook)" # copy conda command to shell
    
    # Download example dataset
    cd /usr/local/envs/bigscape/BiG-SCAPE
    mkdir -p demo
    cd demo
    wget https://raw.githubusercontent.com/nselem/bigscape-corason/master/scripts/data_bigscape_corason.sh
    chmod a+x data_bigscape_corason.sh
    bash data_bigscape_corason.sh -b
    
    # Run BiG-SCAPE on example dataset
    conda activate bigscape
    
    python /usr/local/envs/bigscape/BiG-SCAPE/bigscape.py \
      --inputdir /usr/local/envs/bigscape/BiG-SCAPE/demo/gbks \
      --outputdir /gdrive/My\ Drive/Github/cluster_identification/demo/output/BiG-SCAPE \
      --pfam_dir /usr/local/envs/bigscape/BiG-SCAPE/databases
    
    conda deactivate
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-18
      • 1970-01-01
      • 2021-12-20
      • 1970-01-01
      • 1970-01-01
      • 2022-12-11
      • 1970-01-01
      • 2019-04-01
      相关资源
      最近更新 更多