从深度文件中提取序列深度。

depth-stat的Python项目详细描述


深度统计

1简介

depth_stat是一个从深度文件中提取序列深度并进行一些统计的工具。

https://github.com/linzhi2013/depth_stat

2安装

pip install depth_stat

将在与您的pip命令相同的目录下创建命令depth_stat

3用法

3.1命令行

$ depth_stat
usage: depth_stat [-h] -i <file> [-q <str>] [-a <int>] [-b <int>]
                     [-f <file>]

To extract the sequence depth from depthfile.

The depthfile content format:
seqid1 depth1 depth2 depth3 ...
seqid2 depth1 depth2 depth3 ...

This script is part of the MitoZ project, by Guanliang MENG.
See https://github.com/linzhi2013/depth_stat.


optional arguments:
  -h, --help  show this help message and exit
  -i <file>   input depthfile
  -q <str>    sequence id
  -a <int>    the start position, Python-style (0-leftmost)
  -b <int>    the end position, Python-style for slicing
  -f <file>   a file of 'seqid start end' list on each line

3.2在python3脚本中

In [1]: from depth_stat import SeqDepth

In [2]: sdj = SeqDepth('DRR095708_mitoscaf.fa.fsa.depth')

In [3]: sdj.extract_range_depth(seqid='scaffold44450', start=0, end=20)
Out[3]: [1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8]

In [4]: sdj.range_depth_stat(seqid='scaffold44450', start=0, end=20)
Out[4]: ('scaffold44450', 0, 20, 1, 5.15, 8)

In [5]: sdj.range_depth_freq(seqid='scaffold44450', start=0, end=20)
Out[5]: [(1, 4), (4, 4), (5, 3), (6, 1), (7, 2), (8, 6)]

作者

孟冠良

引文

此脚本是软件包的一部分,当您在工作中使用此脚本时,请引用:

MitoZ: A toolkit for mitochondrial genome assembly, annotation and visualization with NGS data. Guangliang Meng, Yiyuan Li, Chentao Yang, Shanlin Liu (in manuscript)

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

推荐PyPI第三方库


热门话题
java Spring freemarker多模板加载程序路径   在java插件中从控制台获取输入   java在包中创建继承类   网页抓取Java Jsoup网页抓取   java在线程内创建一个对象,而true条件具有相同的引用   java如何根据空格数拆分字符串   java新的安卓 studio更新中的配置文件“app”是什么?   java在将ArrayList写入/读取到文件时出现奇怪的问题   java Reg替换文本块第一次出现+最后一次出现   java当我单击任何RecyclerView列表项时,如何在MainActivity的EditText中显示特定的单击项?   JAVA XML删除节点仅删除第一个外观   java如何在数组中查找特定值   java SVG/矢量图形对象布尔运算(并集、交集、减法)   java在Android中创建线程需要多长时间   尝试从JBOSS联系Oracle LDAP服务器时发生java连接重置异常   java基于参数获取特定的实现实例   使用java就地修改文件内容   java MonetaryException:未加载MonetaryAmountsSingletonSpi   java接受用户的不同输入并使其触发完全相同的代码段的最短方法是什么   Spring 3.2.8应用程序中未找到java HTTP 404错误