Skip to main content

To extract the sequence depth from depthfile.

Project description

depth_stat

1 Introduction

depth_stat is a tool to extract the sequence depth from depthfile and do some statstics.

see https://github.com/linzhi2013/depth_stat.

2 Installation

pip install depth_stat

There will be a command depth_stat created under the same directory as your pip command.

3 Usage

3.1 command line

$ 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 in a Python3 script

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)]

Author

Guanliang MENG

Citation

This script is part of the package MitoZ, when you use the script in your work, please cite:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

depth_stat-0.0.1.tar.gz (17.7 kB view details)

Uploaded Source

File details

Details for the file depth_stat-0.0.1.tar.gz.

File metadata

  • Download URL: depth_stat-0.0.1.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6

File hashes

Hashes for depth_stat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2db0f510a12319c4cd8b529c4440e095fb9218f47477f7e378fd64787bafe04b
MD5 0550701631850c48b91fb8ae811db2e4
BLAKE2b-256 600dc3ff4feb09dc63228da89246957c6cb7322935c5c077c19bbd5a1934f9fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page