這些程式碼包含:
- 資料前處理
- 繪圖
- Bayesian linear regression model 計算
三大部份的程式碼,以下將分別列述。 由於原始資料需經過一定處理轉換才能使用,但細節較多且複雜,另獨立列述。
| # same as Mynt, which requires PyYAML | |
| from yaml import load_all | |
| with open('this_file.md') as f: | |
| # "---" is used to separate mutliple YAML entries, | |
| # so the loader returns a generator | |
| yaml_gen = load_all(f.read(), Loader=Loader) | |
| description = next(yaml_gen) # get first entry only | |
| print(description) # description should be a dict |
Your next, and hoped the last, bio python library.
NextBiopy 中的 Next 有兩種涵意:第一,它想分析次世代定序技術(Next Generation Sequencing)的資料,此類資料龐大,在以往缺乏統一且有效的方式來讀取相關檔案;第二,Python 有一專門處理生物相關的套件 Biopython,但歷史久遠有許多包伏下,面對未來大資料的分析往往效能表現不理想,且 API 設計複雜,故希望藉次世界定序為出發點,逐一改善 Biopython 其他功能的效能表現與設計。
平常生資研究者往往專注在分析結果上,往往缺乏一個完整的時間改善分析流程與使用工具,以及與同仁交流技術的場所。藉由本次 Sprint 互相認識以及經驗分享,並對於 NextBiopy 架構如何設計才能更滿足多數研究者的需求。
NextBiopy 相較本次其他專案而言,為較初期的專案,加上研究者可能較缺乏開源協同開發的經驗,大部份的 issue 為解決跨版本、跨平台、CI、底層架構設計等問題。故本專案會藉由這次 Sprint 來讓參加者了解開源專案所需的基礎技術與建設。
| # 本資料由 PaiChiou (基隆金城武) 於 2013.08.08 分享 | |
| # 文章代碼(AID): #1I0eeAVU (NTU) [ptt.cc] [分享] B02級男女比例表 | |
| # 文章網址: http://www.ptt.cc/bbs/NTU/M.1375898122.A.7DE.html | |
| # 資料簡述: | |
| # 台灣大學 B02級(2013.09入學) 新生男女比例表 | |
| # | |
| # TODO: | |
| # * 性別比按院系作圖 | |
| # * 人數按院系作圖 | |
| # * 聯誼人數配對問題 |
| # Code here is adapted from | |
| # http://gettinggeneticsdone.blogspot.tw/2011/04/using-rstats-bioconductor-to-get.html | |
| # If Bioconductor or the required packages (e.g., BSgenome) are not installed, | |
| # One should first run the following code section "Installation" | |
| source("http://www.bioconductor.org/biocLite.R") | |
| # === Installation === | |
| # --- known gene --- | |
| # biocLite('TxDb.Hsapiens.UCSC.hg19.knownGene') |
| if a==b: | |
| with open('f.txt') as f: | |
| # do something | |
| # do something |
| $ export CC=clang | |
| $ export CXX=clang | |
| $ export FFLAGS=-ff2c | |
| $ git clone https://github.com/numpy/numpy.git | |
| $ cd numpy | |
| $ python3 setup.py build | |
| $ python3 setup.py install |