App-Anchr

 view release on metacpan or  search on metacpan

doc/pacbio_consensus.md  view on Meta::CPAN

# Falcon 安装与样例

[TOC levels=1-3]: # " "
- [Falcon 安装与样例](#falcon-安装与样例)
- [RS II 与 Sequel 对比](#rs-ii-与-sequel-对比)
- [文档](#文档)
    - [[几个术语](http://www.pacb.com/wp-content/uploads/2015/09/Pacific-Biosciences-Glossary-of-Terms.pdf)](#几个术语)
    - [[Falcon 参数](https://github.com/PacificBiosciences/FALCON/wiki/Manual)](#falcon-参数)
    - [Falcon 结果文件](#falcon-结果文件)
- [分析平台的历史](#分析平台的历史)
- [安装 GenomicConsensus 和 falcon](#安装-genomicconsensus-和-falcon)
    - [安装Linuxbrew](#安装linuxbrew)
    - [通过 pitchfork 编译](#通过-pitchfork-编译)
    - [直接安装 falcon-integrate, 现在不推荐](#直接安装-falcon-integrate-现在不推荐)
- [falcon 样例数据](#falcon-样例数据)
    - [`falcon/example` 里的 [*E. coli* 样例](https://github.com/PacificBiosciences/FALCON/wiki/Setup:-Complete-example).](#falconexample-里的-e-coli-样例)
    - [Scer S288c](#scer-s288c)
    - [Atha Col-0](#atha-col-0)
    - [复活草](#复活草)
    - [Atha Ler-0](#atha-ler-0)
    - [其它模式生物](#其它模式生物)
- [其它相关的程序](#其它相关的程序)
    - [PacBio 自产](#pacbio-自产)
    - [混合组装](#混合组装)
- [中文资料](#中文资料)

# RS II 与 Sequel 对比

现在主流的两种 PacBio 平台
[RS II 与 Sequel 对比](http://allseq.com/knowledge-bank/sequencing-platforms/pacific-biosciences/)

P 指得是聚合酶, C 是化学试剂.

|                          | RS II (P6-C4) |  Sequel  |
|:-------------------------|:-------------:|:--------:|
| Run time                 |    240 min    | 240 min  |
| Total output             |   0.5-1 Gb    | 5-10 Gb  |
| Output/day               |     2 Gb      |  20 Gb   |
| Mean read length         |   10-15 kb    | 10-15 kb |
| Single pass accuracy     |     ~86%      |   ~86%   |
| Consensus (30X) accuracy |   >99.999%    | >99.999% |
| # of reads               |      50k      |   500k   |
| Instrument price         |     $700k     |  $350k   |
| Run price                |     $400      |   $850   |

|                    |  Sequel   |                  原因                   |
|:-------------------|:---------:|:--------------------------------------:|
| Human Whole Genome |  Ok/Good  | 贵; 低偏向, 长读长, 利于鉴定结构变异及组装  |
| Small Genome       |   Good    |         长读长, 只需要较低的通量          |
| Targeted           |   Good    |         长读长, 只需要较低的通量          |
| Transcriptome      | Poor/Good |       贵; 但二代没法得到全长的转录本       |
| Metagenomics       |  Poor/Ok  |         贵; 但利于 de novo 组装          |
| Exome              |   Poor    |        贵; 长读长对外显子没有用处         |
| RNA Profiling      |   Poor    |                   è´µ                   |
| ChIP-Seq           |   Poor    |                   è´µ                   |

# 文档

* PacBio 在 github 上的[首页](https://github.com/PacificBiosciences)
* [Quiver HowTo](https://github.com/PacificBiosciences/GenomicConsensus/blob/master/doc/HowTo.rst)
* [Quiver FAQ](https://github.com/PacificBiosciences/GenomicConsensus/blob/master/doc/FAQ.rst)
* [FALCON Manual](https://github.com/PacificBiosciences/FALCON/wiki/Manual)
* [FALCON Tips](https://github.com/PacificBiosciences/FALCON/wiki/Tips)
* [PacBio çš„ slides](https://speakerdeck.com/pacbio)
* [一些基本定义, p24-28](https://speakerdeck.com/pacbio/specifics-of-smrt-sequencing-data)
* HDF5 即将成为历史, PacBio 正在向 BAM 转移
* [PacBio 的 BAM 格式](http://pacbiofileformats.readthedocs.io/en/3.0/BAM.html)
* [UC DAVIS](http://dnatech.genomecenter.ucdavis.edu/2016/11/10/new-service-long-read-sequencing-on-the-pacbio-sequel/)
* Falcon 问题合集
    * [Trace assembled and unassembled reads in FALCON](https://github.com/PacificBiosciences/FALCON/issues/472)
    * [Is there any need to polish the assembly result with quiver?](https://github.com/PacificBiosciences/FALCON/issues/304)
    * [minimum sequencing depth requirement for FALCON](https://github.com/PacificBiosciences/FALCON/issues/256)
    * [Hybrid Assembly using falcon](https://github.com/PacificBiosciences/FALCON/issues/282)
    * 调整 falcon 参数
        * [Falcon assembly](https://github.com/PacificBiosciences/FALCON/issues/308)
        * [how to set the appropriate config file for larger genome using local mode](https://github.com/PacificBiosciences/FALCON/issues/466)

## [几个术语](http://www.pacb.com/wp-content/uploads/2015/09/Pacific-Biosciences-Glossary-of-Terms.pdf)

* Subreads - 测序仪直接输出的实时序列, SMRTbell 两个接头之间的序列.
* CCS - 对于较短的模板, 聚合酶在会在环形的 SMRTbell 上环绕多次, 即对同一序列测序多次. 得到的保守序列即为 CCS.
* Long reads - 模板较长, 聚合酶没有抵达 SMRTbell 另一端的接头.
* `.subreads.bam` - 可直接用于分析的 subreads.
* `.scraps.bam` - 接头, 标签和可能有问题的 subreads.

## [Falcon 参数](https://github.com/PacificBiosciences/FALCON/wiki/Manual)

* input_fofn - 输入的 fasta 文件路径
* input_type - `raw` for subreads, `preads` for error corrected reads
* length_cutoff - 用于纠错步骤的种子 reads 长度, 可设得稍小一点, 以达到 15x - 20x 覆盖量
* length_cutoff_pr - 用于组装的 reads 长度. 这一步里 reads 多并不代表好, 可以多调整
* pa_concurrent_jobs
* falcon_sense_option - 用于 fc_consensus.py
    * --min_cov - controls when a seed read gets trimmed or broken due to low coverage
    * --max_n_read - puts a cap on the number of reads used for error correction. 对于高重复的基因组,
      这个得设得小一点.
* pa_* - 纠错步骤的参数
* ovlp_* - 组装步骤的参数
* overlap_filtering_setting - 简化 overlap graph 里的 edges.
    * --bestn - "best n overlaps" in the 5' or 3' ends
    * --max_cov, --min_cov, --max_diff - 简单的 reads 两端的 coverages 应该是平衡的, 如果其中包含了
      repeats, 则两端会出现不平衡的状态, 即含有 repeats 的一端 coverages 会高很多. 如果一个 reads 的错误比例太高,
      也可以通过这种方法把它排除出去.
    * What is the right numbers used for these parameters? These parameters may the most tricky ones
      to be set right. If the overall coverage of the error corrected reads longer than the length
      cut off is known and reasonable high (e.g. greater than 20x), it might be safe to set min_cov
      to be 5, max_cov to be three times of the average coverage and the max_diff to be twice of the
      average coverage. However, in low coverage case, it might better to set min_cov to be one or
      two. A helper script called fc_ovlp_stats.py can help to dump the number of the 3' and 5'
      overlap of a given length cutoff, you can plot the distribution of the number of overlaps to
      make a better decision.

##  Falcon 结果文件

* `daligner`
    * `0-rawreads/job_*`
    * 每进程两线程
* `fc_consensus`
    * `0-rawreads/m_*`
    * 由 `falcon_sense_option` 里的 `--n_core` 指定线程数. 内部会竞争 CPU, 超出 CPU 数量会极大地降低性能
* `FA4Falcon`
    * `0-rawreads/preads/cns_*`
    * 前面合并的 rawreads 生成 preads, 高 I/O. 耗时最长.

* `0-rawreads/`
    * `0-rawreads/preads/` - the error corrected reads
* `1-preads_ovl/` - pread overlaps
* `2-asm-falcon/`
    * `p_ctg.fa` - primary contigs, 组装好的 draft genome
    * `a_ctg.fa` - alternative contigs, 无法区分的 contigs, 可能是二倍体, 也可能是重复序列
    * `sg_edges_list` - 原始 reads 之间的联系, 也就是组装 string graph 里的 edges. 可以用它将 reads 映射回
      contigs

# 分析平台的历史

GenomicConsensus 是 PacBio 的组合程序包 SMRT Analysis Software (SMRTanalysis) 的一部分. 用于 consensus 和
variant calling. SMRTanalysis 的当前版本为 v2.3.0, 发表时间为2014年. v3.0 好像已经跳票, v3.2
不知道什么时候出来.



( run in 1.966 second using v1.01-cache-2.11-cpan-b16cb0d3907 )