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

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中的PDF文件   linux Java打开文件,形成实际用户主页~/   java如何在时间线内维护TableView选择?   java Hibernate注释@Where vs@WhereJoinTable   Java读/写访问异常FileNotFoundException(访问被拒绝)   继承在Java中是否可以扩展最后一个类?   Android HttpClient使用java使应用程序崩溃。lang.OutOfMemoryError:pthread_create   java为什么即使我在proguardproject中添加了jar文件,也会出现这种错误。txt?   如果添加JButton,swing Java FocusListener和KeyListener将无法工作   java使用solrj检索json格式的SolrDocument   使用Microsoft Visual Studio代码进行Java编程   java NoClassDefFoundError:org/apache/log4j/Logger   哈希集中包含相等对象的java   java中的参数化构造函数是否需要有一个主体?   java类似于NetBeans不必要的代码检测器   Java实践问题   java Blackberry“[projectname].调试文件丢失”和“I/O错误:找不到程序”jar