树结构隐马尔可夫模型的变分推理

treehmm的Python项目详细描述


快速启动

# INSTALLATION
# If you're on Ubuntu
sudo apt-get install python-pip python-scipy python-matplotlib cython git

# OR if you're on a mac
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install python scipy matplotlib cython git

# don't forget python prerequisite `pysam`
sudo pip install -U pysam


# grab and build the tree-hmm code
# easiest way first:
sudo pip install -U treehmm

# OR using the latest development version
git clone https://github.com/uci-cbcl/tree-hmm.git
cd tree-hmm

# building the package:
# don't install-- just test:
python setup.py build_ext --inplace
export PYTHONPATH=$PYTHONPATH:`pwd`
export PATH=$PATH:`pwd`/bin

# OR go ahead and install
sudo pip install -e .


# RUNNING
# download some sample .bam files from our server and histogram them to binary .npy
mkdir data && cd data
tree-hmm convert
    --download_first \
    --base_url "https://cbcl.ics.uci.edu/public_data/tree-hmm-sample-data/%s" \
    --chromosomes chr19 \
    --bam_template "wgEncodeBroadHistone{species}{mark}StdAlnRep{repnum}.REF_chr19.bam" \
    --marks Ctcf H3k27me3 H3k36me3 H4k20me1 H3k4me1 H3k4me2 H3k4me3 H3k27ac H3k9ac \
    --species H1hesc K562 Gm12878 Huvec Hsmm Nhlf Nhek Hmec


# split chr19 into smaller pieces
tree-hmm split observations.chr19.npy


# do inference on the resulting chunks (creates infer_out directory)
tree-hmm infer 5 --max_iter 3 --approx poc --run_local "observations.chr19.chunk*.npy"


# convert the inferred states into BED format for viewing on the genome browser
tree-hmm q_to_bed infer_out/mf/*


# upload the BED files to UCSC, analyze, etc

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Clojure关键字在内存中的大小是多少?   Java中有固定长度的通用数组对象吗?   PostgreSQL:通过Java更新我的用户表   错误:使用java解析xml   java Json显示列表中对象的名称   java比较JodaTime时区   与JAVA中的API和包的区别?   java的int值在for循环中不改变   谷歌应用引擎中的java RSA   迁移到spring 5后出现java非法字符错误   java Websphere管理控制台不工作   JavaGSON如何始终在json中包含毫秒?   带有空格和双引号的windows Java ProcessBuilder命令参数失败   java错误:重复的zip条目[43.jar:org/apache/http/annotation/NotThreadSafe.class]