Giter Club home page Giter Club logo

assembly-stats's Introduction

Genome Assembly Stats

Python script for summarizing a genome assembly

This script will summaryze the nucleotide content in a fasta file by calculating:

Total sequences
Total bases
Total Ns (undefined bases)
Total Gaps (strings of undefined bases longer than 5)
Shortest sequence
Longest sequence
Mean length
N50
Overall G+C content
Min G+C per sequence
Max G+C per sequence

Running the script with test files

Before running the script, make sure the following libraries are installed (tested in Python 3.8.12, macOS Big Sur):

import tabulate
import plotext as plt

Results are also printed on the screen, make sure you're using a suitable python version.

python fastaMetrics_py3.py -h 
usage: fastaMetrics.py [-h] -i INPUT -o OUTPUT

Calculate summary statistics for genome assemblies
---------------------
Tested in python 3.8.12

optional arguments:
  -h, --help        show this help message and exit

Mandatory arguments:
  -i INPUT, --input, Input fasta file (genome assembly)
  -o OUTPUT, --output, Prefix for the output files, results are also printed on screeen

Running script with test file:

python fastaMetrics_py3.py -i pfalciparium3D7_PlasmoDB-61.fasta -o pf3d7

image

Output

Results are also saved in a tsv file, as shown in the figure above (pf3d7_Summary.txt). It will also produce a table containing the cumulative length (pf3d7_CumulativeLength.txt).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.