数据库.seqs
一个分析多个后列(信息内容,频率,.)的模块
开始
安装模块 : npm install stat.seqs
var MSAStats = require('stat.seqs');
var seqs = ["AACG", "CACG", "AAGC", "CAAG"];
var stats = MSAStats(seqs);
所有操作都会被缓存,但如果改变序列,它们将会被再次计算出.
业务
频率
stats.frequency() // calculates the relative frequency of a base at a given position
> [ { A: 0.5, C: 0.5 },
{ A: 1 },
{ C: 0.5, G: 0.25, A: 0.25 },
{ C: 0.25, G: 0.75 } ]
序列认同和共识
stats.consensus() // calculates the consensus
> "AACG"
stats.identity() // identity to the consensus seq
> [ 1, 0.75, 0.5, 0.5 ]
stats.identity("AAAA") // identity to the given seq
> [ 0.5, 0.25, 0.5, 0.5 ]
背景分布
stats.background() // calculates the background distribution of all seqs
> { A: 0.4375, C: 0.3125, G: 0.25 }
stats.bg = {A: 0.25, C: 0.25, G: 0.25, T: 0.25} // set your own background distribution
stats.useBackground(); // use background distribution in anlysis
信息内容(内容)和保护
stats.ic() // calculates the information content
> [ 1, 0, 1.5, 0.81 ]
// change your alphabet
stats.setDNA(); // default
stats.setProtein();
stats.alphabetSize = 21; // your own size
// now you can scale the information content
stats.scale(stats.ic());
> [ 0.5, 0, 0.75, 0.41 ]
stats.conservation() // needs an alphabetSize!
> [ 1, 2, 0.5, 1.19 ]
stats.scale(stats.conservation()) // scale conservation
> [ 0.5, 1, 0.25, 0.59 ]
stats.conservResidue() // calculate conservation per residue
> [ { A: 0.5, C: 0.5 },
{ A: 2 },
{ C: 0.25, G: 0.13, A: 0.13 },
{ G: 0.89, C: 0.3 } ]
stats.conservResidue({scaled: true})
> [ { A: 0.25, C: 0.25 },
{ A: 1 },
{ C: 0.13, G: 0.06, A: 0.06 },
{ G: 0.45, C: 0.15 } ]
规模和养护需要一套 alphabetSize (违约4);
具有背景分布的养护
(工作正在进行)
stats.useBackground(); // by default from all letters
stats.ic() // calculates the information content
stats.scale(stats.ic());
stats.conservation(
stats.scale(stats.conservation())
stats.conservResidue()
stats.conservResidue({scaled: true})
三维分析
stats.maxLength()
> 4
stats.gaps() // relative percentage of gaps for a column
> [0, 0, 0, 0]
运行序列
stats.addSeq("AAA")
stats.addSeqs(["AAA", "AAB"])
stats.resetSeqs(["AAA", "AAB"])
stats.removeSeq("AAA")
stats.removeSeq(2) // you can also use indexes
捐款
请将所有问题提交人权理事会 绿化/stat.seqs 仓库 !
支助
如果你有任何问题或建议,请提出一个问题 这里。 。 。 .
许可证
麻省理工学院许可证
版权(c)2014年,绿化
特此免费准许任何人 获取该软件和相关文件的副本 文件(“软件”),在软件中处理,不包含 限制,包括不限制使用权, 复制、修改、合并、出版、发行、分版和/或销售 软件的复制本,并允许向 为此提供了软件,但须符合下列条件: 条件:
上述版权通知和本许可通知应为: 列入软件的所有副本或大部分.
软件是提供的"是", 没有任何种类的恐惧, 或监禁,包括但不限制于 特别目的和目的的证明 无所不入。 绝对不能让警察或警察 B. 任何索赔、救济或其他负债的持有者, 条约、条约或其他条约行动 来源、来源或与溶剂或使用有关的 其他交易 在软件.
