统计文件库和转换脚本。

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要求^{} (Version 3.x) 安装。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-1Sheep-2等等以下代码转换文件 example.fasta进入计数文件example_from_fasta.cf

FastaToCounts.py example.fasta example_from_fasta.cf

转换脚本

每个脚本都有自己的文档。请执行,例如

FastaToCounts.py --help

所有转换脚本都可以在scripts文件夹中找到。

文档

如果您对cflib本身感兴趣,请参阅 cflib reference manual

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java ArrayIndexOutOfBoundsException,但不访问任何索引   用JAVA代码复制的奇怪结果   基于当前用户的Java目标目录   运行时错误java scanner不接受中间有空格的两个单词   java Android从editText获取文本   枚举内的java搜索   java自定义布局高度包装内容,而不是使用定义的布局高度   Java 5中引入的Enum类的用途是什么?   excel如何在java swing中查看xls文档   java如何模拟影响对象的void返回方法   Java线程之间的多线程数据交换   JavaSpring引导:库是否会从父应用程序/服务获取依赖关系   java经过一段时间的循环:为什么刚刚写入的数组是空的?   Regex和java忽略引号内的关键字和字符串   oracle我正在从java读取文本文件(逗号作为分隔符)