Giter Site home page Giter Site logo

jbdatascience / ncd_python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from romantao/ncd_python

0.0 1.0 0.0 4.64 MB

Kolmogorov complexity approximation using NCD. Example for comparison of DNA sequences

Python 0.15% HTML 32.95% Shell 0.73% C 66.11% Batchfile 0.01% Objective-C 0.07%

ncd_python's Introduction

How to use ncd.py

"python ncd_calc.py data_folder compressor" "compressors available: zlib or bz2" "example: python ncd.py data/animals/ zlib"

This program uses the Normalized Compression Distance to evaluate the similarity degree the mtDNA of different animals, thus inferring their genetic similarity.

The results obtained from the ncd.py script are in the format required for post processing in Phylip (http://evolution.genetics.washington.edu/phylip.html).

To generate a phylogenetic tree from the example dataset using the zlib compressor, the following procedure shall be followed:

  1. Execute the script

    python ncd.py data/animals/ zlib

    the output file, "q.phy" is a upper diagonal matrix

  2. execute the Phylip program neighbor

    ./phylip-3.695/neighbor

  3. Choose "q.phy" as source and select Upper Triangular Data Matrix (R). Process the files and the program will output:

    Output written on file "outfile" Tree written on file "outtree" Done.

  4. Execute the script "name_replace" to introduce the names of the animals in the outtree file

    python "name_replace.py"

  5. Execute the Phylip program drawtree

    ./phylip-3.695/neighbor

  6. Choose "outtree" as the input file and "font1" as the used font. Select option (B) to not use branch length and produce the output file.

  7. the result phylogenetic tree will be saved in the newly created "plotfile"

ncd_python's People

Watchers

 avatar

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.