问题标签 [skbio]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - 如何在python中找到相异矩阵(植物群落)?
我有一个植物群落矩阵作为 numpy 数组,其中行是物种,列是群落
我想计算相异矩阵。我尝试安装 python 包 scikit-bio 但我收到错误
我安装了 ecopy 模块。当我导入 ecopy 时,我收到错误“无效语法 -ecopy.regression”
如何解决以上问题?或者我可以使用python中的任何其他模块吗?
skbio - 运行 skbio.stats.ordination.CA 时出错:“LinAlgErr:SVD 未收敛”
我想使用 Emperor 在 QIIME 上下文之外创建交互式 PCoA 图。为此,我需要从我的数据矩阵生成一个排序文件,就像 skbio.stats.ordination.CA 提供的结果一样。
我的数据是细菌菌株(行)和在其基因组中发现的 COG(列)的 pandas DataFrame。每列是一个不同的 COG,每个菌株都有每个 COG 的 0 到 4 个拷贝。矩阵中有很多零,但没有完全由零填充的行或列。
当我尝试stats.ordination.CA
按如下方式运行时:
其中cogs
是由matrix_dm
列标题组成的熊猫系列。
我收到一个很长的错误,以:'LinAlgError:SVD 没有收敛'结尾
我已经验证我的矩阵不包含任何 NaN 或 Infs。根据其他几个线程,这可能是 scikit-bio 中的一个错误。关于可能发生的事情还有其他想法吗?
python - 无法运行 pyLDAvis。出现错误:ImportError:无法导入名称 PCoA
我已经使用 gensim 创建了 LDA 模型。现在,我想使用 pyLDAvis 库将其可视化,但得到:
谁能帮我解决这个问题或提出一些替代方案。
提前致谢。
skbio - 用于对齐的 TabularMSA 替换 (scikit-bio 0.4.1.dev0)
我想读取 PHYLIP 比对(FASTA 格式),更新序列标签并将结果写回文件。如何编辑以下行以在 scikit-bio 0.4.1.dev0 中使用 TabularMSA(而不是之前支持的 Alignment):
from skbio import Alignment
...
msa_fa = Alignment.read(gene_msa_fa_fp, format='fasta')
msa_fa_update_ids, new_to_old_ids = msa_fa.update_ids(func=id_mapper)
msa_fa_update_ids.write(output_msa_phy_fp, format='phylip')
...
谢谢!
python - 使用 scikit-bio write 写入多个 fasta 条目
我正在尝试使用 scikit-bio 读取 FASTA 文件条目,然后如果满足某些要求,则将某些条目写回另一个文件。我遇到的问题是这些.write
方法似乎打开和关闭一个文件,因此每个条目都会覆盖前一个。
我希望在这种情况下会写入两个条目,foo.txt
但只有最后一个条目存在。如何将符合我的标准的所有序列写入文件?
skbio - 使用 skbio 从压缩的 FASTA bz2 文件中读取
是否可以从压缩文件(例如 FASTA bz2)中读取?我通常使用skbio.sequence.Sequence.read但在那里看不到这个选项。
谢谢!
python - scikit-bio 从 gff3 文件中提取基因组特征
scikit-bio 是否可以从基因组 fasta 文件中提取存储在 gff3 格式文件中的基因组特征?
例子:
基因组.fasta
注释.gff3
mRNA 特征 (transcript1) 的所需序列将是两个子 CDS 特征的串联。所以在这种情况下,这将是'ATGGAGCTATGA'
.
machine-learning - 如何获得`skbio` PCoA(主坐标分析)结果?
我正在查看attributes
ofskbio's
PCoA
方法(如下所列)。我对此API
并不陌生,我希望能够将eigenvectors
原始点投影到类似于.fit_transform
in的新轴上,sklearn.decomposition.PCA
这样我就可以创建一些PC_1 vs PC_2
风格的图。我想出了如何获得eigvals
andproportion_explained
但又features
以None
.
是因为它处于测试阶段吗?
如果有任何使用它的教程,那将不胜感激。我是一个超级粉丝scikit-learn
并且想开始使用更多的scikit's
产品。
这是我生成principal component analysis
对象的代码。
machine-learning - Why is `sklearn.manifold.MDS` random when `skbio's pcoa` is not?
I'm trying to figure out how to implement Principal Coordinate Analysis
with various distance metrics. I stumbled across both skbio
and sklearn
with implementations. I don't understand why sklearn
's implementation is different everytime while skbio
is the same? Is there a degree of randomness to Multidimensional Scaling
and in particular Principal Coordinate Analysis
? I see that all of the clusters are very similar but why are they different? Am I implementing this correctly?
Running Principal Coordinate Analysis
using Scikit-bio
(i.e. Skbio
) always gives the same results:
Now with sklearn
's Multidimensional Scaling
: