我正在尝试执行 Kolmogorov-Smirnov 检验来比较经验分布与 F 分布(我知道这些不能直接比较,但我将采用引导法)。我在 scipy KS 测试中遇到问题:
readLengths = [list,of,int,values,...]
x = stats.f.fit(readLengths)
dfn=x[0]
dfd=x[1]
stats.kstest(readLengths,stats.f.rvs(dfn,dfd,size=100))
Run Code Online (Sandbox Code Playgroud)
我收到错误
TypeError: 'numpy.ndarray' object is not callable
Run Code Online (Sandbox Code Playgroud)
它指向 stats.kstest 行。我认为这是 readLengths 数组的问题,但文档说它可以采用一维数组,所以不确定为什么我会遇到这个问题。另外,有趣的是,在这个函数中,您可以用“norm”命名正态分布,但“f”似乎无效,尽管它是 F 分布的 scipy 名称。
我正在尝试为 R 安装 data.table 库,但我无法让它工作。我已经尝试使用 CRAN 和 Bioconductor,但我一直收到一个错误,即该软件包不可用于 R 3.2.2:
> biocLite('data.table')
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.1 (BiocInstaller 1.18.4), R version 3.2.2.
Installing package(s) ‘data.table’
Warning: unable to access index for repository
https://cran.rstudio.com/src/contrib
Warning: unable to access index for repository
https://cran.rstudio.com/src/contrib
Warning message:
package ‘datatable’ is not available (for R version 3.2.2)
> install.packages("data.table")
Warning: unable to access index for repository
https://cran.rstudio.com/src/contrib
Warning message:
package ‘data.table’ is not available (for R version 3.2.2)
Run Code Online (Sandbox Code Playgroud)
我真的不知道该怎么做……对 R 非常陌生。
我知道这应该很简单,但我不能让它工作.我的文件看起来像这样
>c12345|random info goes here that I want to delete
AAAAATTTTTTTTCCCC
>c45678| more | random info| here
GGGGGGGGGGG
Run Code Online (Sandbox Code Playgroud)
而我想要做的就是让它变得更加简单,所以它可能看起来像这样
>seq1 [organism=human]
AAAAATTTTTTTTCCCC
>seq2 [organism=human]
GGGGGGGGGGGG
>seq3 [organism=human]
etc....
Run Code Online (Sandbox Code Playgroud)
我知道一旦我通过执行以下操作获得索引部分,我就可以轻松追加该常量:
sed '/^>/ s/$/\[organism-human]/g'
Run Code Online (Sandbox Code Playgroud)
但是如何构建该索引呢?
bioconductor ×1
data.table ×1
fasta ×1
numpy ×1
python ×1
r ×1
scipy ×1
sed ×1
statistics ×1
unix ×1