统计文件库和转换脚本。
cflib-pomo的Python项目详细描述
计数文件库
这个python库cflib
提供了在fasta、vcf和
计算文件数。文件使用的计数
PoMo,一个
一个多态性感知系统发育模型的实现我们建议你使用
pomo在IQ-TREE中实现。
有关参考,请参阅并引用:
Schrempf, D., Minh, B. Q., De Maio, N., von Haeseler, A., &
Kosiol, C. (2016). Reversible Polmorphism-Aware Phylotenetic
Models and their Application to Tree Inference. Journal of
Theoretical Biology, in press.
要求
cflib
要求^{cflib
还使用以下python库
安装时自动拉取cflib
:
安装
安装cflib
和转换脚本
pip install --user cflib-pomo
请注意,pypi存储库上cflib
(由pip
使用)的名称是
cflib-pomo
,因为名字cflib
被取了!
如果操作系统的标准Python版本仍然是2.x(例如。,
osx),确保使用,pip3
。
--user
标志是可选的,它告诉python安装cflib
和
脚本仅适用于此用户,但不适用于整个系统。
如果要卸载cflib
,
pip uninstall cflib-pomo
在下列情况下,[转换脚本](#转换脚本)应直接可用
您的PATH
环境变量设置正确。对于我的Linux安装,
必须包含python路径~/.local/bin
。这可能会因您的
操作系统。
示例
样本数据可以在examples中找到。假设已经安装了
cflib
我们现在将^{example_from_fasta.cf
的文件。第script
我们将使用的是^{
FastaToCounts.py --help
usage: FastaToCounts.py [-h] [-v] [--iupac] fastaFile output
Convert fasta to counts format.
The (aligned) sequences in the fasta file are read in and the data is
written to a counts format file.
Sequence names are stripped at the first dash. If the stripped
sequence name coincide, individuals are put into the same population.
E.g., homo_sapiens-XXX and homo_sapiens-YYY will be in the same
population homo_sapiens.
Take care with large files, this uses a lot of memory.
The input as well as the output files can additionally be gzipped
(indicated by a .gz file ending).
If heterozygotes are encoded with IUPAC codes (e.g., 'r' for A or G),
homozygotes need to be counted twice so that the level of polymorphism
stays correct. This can be done with the `--iupac` flag.
positional arguments:
fastaFile path to (gzipped) fasta file
output name of (gzipped) outputfile in counts format
optional arguments:
-h, --help show this help message and exit
-v, --verbose turn on verbosity (-v or -vv)
--iupac heteorzygotes are encoded with IUPAC codes
根据请求,example.fasta
中的序列名是,例如,
Sheep-1
、Sheep-2
等等以下代码转换文件
example.fasta
进入计数文件example_from_fasta.cf
:
FastaToCounts.py example.fasta example_from_fasta.cf
转换脚本
- CountsToFasta.py:将计数文件转换为 fasta文件
- FastaToCounts.py:将fasta文件转换为counts 格式。
- FastaToVCF.py:将fasta文件转换为变量调用 格式。
- FastaVCFToCounts.py:转换fasta 使用VCF文件引用计数格式。
- FilterMSA.py:过滤多序列对齐
文件(应用标准筛选器;cf.
libPoMo
) - GPToCounts.py:实验性的。转化基因 参考计数格式的预测文件。
- MSAToCounts.py:转换多个序列 与VCF文件对齐以计数格式。
每个脚本都有自己的文档。请执行,例如
FastaToCounts.py --help
所有转换脚本都可以在scripts文件夹中找到。
文档
如果您对cflib
本身感兴趣,请参阅
cflib reference manual