我想用antiSMASH(https://docs.antismash.secondarymetabolites.org/在谷歌Colab)。如何设置并运行示例?
您必须首先安装 Anaconda。
以下命令将创建一个虚拟环境并将 antiSMASH 安装到其中:
%%shell
eval "$(conda shell.bash hook)" # copy conda command to shell
# Create virtual environment for antiSMASH, then install dependencies, antiSMASH, and databases into it (this will take a while)
conda create --prefix /usr/local/envs/antismash antismash -y
conda activate antismash
# Download antiSMASH databases and check that everything was installed properly
download-antismash-databases
antismash --check-prereqs
conda deactivate
下载样本基因组以测试 antiSMASH
accession = 'NC_013216'
antismash_path = '/usr/local/envs/antismash'
output_string = '%s/output/%s.gbk'%(antismash_path, accession.strip())
handle = Entrez.efetch(db="nucleotide", id=accession, rettype="gbwithparts", retmode="text")
print('Download of %s successful'%(accession.strip()))
print('Reading ' + output_string + '...')
record_string = handle.read()
with open(output_string, 'w') as record_writer:
record_writer.write(record_string)
print('Saved as: ' + output_string)
使用 antiSMASH 处理样本基因组
%%shell
eval "$(conda shell.bash hook)" # copy conda command to shell
conda activate antismash
echo "Processing with antiSMASH..."
antismash /usr/local/envs/antismash/output/NC_013216.gbk \
--output-dir /usr/local/envs/antismash/output/NC_013216
conda deactivate
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句