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

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在ArrayList中比较数字   java在Kotlin中使异步调用同步   让“Scala编程”junit示例在IntelliJ中工作的java问题   java Servlet侦听器未在ContextListener中设置属性   将Microsoft SQL Server数据库连接到我的Java项目   加载资源时出现java“需要注册工厂”异常   java如何使用POI检查excel中的重复记录?   java如何更改机器生成的代码   java如何确保重写的方法是同步的   用Spring编写Hibernate时的java XML奥秘   java管理mysql数据库中存储的用户权限   java如何运行。来自Javascript的jar方法   java我想在Web应用程序中进行身份验证&对桌面应用程序使用相同的凭据。我该怎么做?