斯奈克马克生物信息学图书馆。
SMBL的Python项目详细描述
如果有任何问题,请随时与我联系。
简短说明
smbl是一些有用的规则和python函数库,可用于snakemake(https://bitbucket.org/johanneskoester/snakemake/)管道。它使得自动 安装各种生物信息学程序,如读取映射程序、读取模拟器、转换工具等。 它还支持下载和转换fasta格式的一些重要参考文献(如人类基因组)。
安装/升级
要安装smbl,您至少需要有类unix的操作系统(例如linux、macos)和python 3.3。 可以使用以下命令执行安装/升级。
pip3 install --upgrade smbl
如果还没有安装snakemake,它将 与SMBL一起自动安装。
git中smbl的当前版本可以通过以下方式安装
pip3 install --upgrade git+git://github.com/karel-brinda/smbl
要求
为了能够自动下载和安装软件,smbl要求unix系统中存在以下程序:
- wget或curl
- 合同一般条件4.7+
- 吉特
- 制造
用法
要使用smbl,您必须导入smblpython包,并包含一个包含所有规则的文件,使用:
importsmblinclude:smbl.include()
然后您可以使用所有支持的程序或数据。当它们作为规则的输入出现时,它们将被下载或编译。
所有程序都安装到~/.smbl/bin/,所有fasta文件都安装到~/.smbl/fa/。
程序
fasta文件
FASTA file | Variable with its filename |
---|---|
An example small FASTA file | ^{tt51}$ |
An example small FASTA file | ^{tt52}$ |
An example small FASTA file | ^{tt53}$ |
Human genome HG38 (GRCh38) | ^{tt54}$, ^{tt55}$ |
Mouse genome MM10 | ^{tt56}$ |
Chimpanzee genome PANTR04 | ^{tt57}$ |
示例
下面的示例演示如何使用smbl自动安装软件。
创建名为Snakefile的空文件,其内容如下:
importsmblinclude:smbl.include()ruleall:input:smbl.prog.DWGSIM,smbl.prog.BWA,smbl.fasta.EXAMPLEparams:PREF="simulated_reads",INDEX="bwa_index"output:"alignment.sam"run:# read simulationshell("{input[0]} -C 1 {input[2]} {params.PREF}")# creating BWA index of the reference sequenceshell("{input[1]} index {input[2]}")# mapping by BWAshell("{input[1]} mem {input[2]} {params.PREF}.bfast.fastq > alignment.sam")
运行脚本
snakemake
发生了什么:
- 下载了一个示例fasta文件
- dwgsim和bwa被下载、编译和安装
- dwgsim模拟对示例fasta文件的读取
- 这些读取被bwa映射回引用(alignment.sam被创建)