GithubHelp home page GithubHelp logo

distance_visualization_python's Introduction

Pairwise distance visualization in Python

Contributors

Qingxiang Guo

About

The following contents contains source code for the analyses and plots in Parasites & Vectors paper, 2018, “Morphological plasticity in Myxobolus Bütschli, 1882: a taxonomic dilemma case and renaming of a parasite species of the common carp”

Abstract

Myxozoans are a group of cnidarian parasites, the present taxonomy of which favors a more comprehensive characterization strategy combining spore morphology, biological traits (host/organ specificity, tissue tropism), and DNA data over the classical morphology-based taxonomy. However, a systematist might again run into a taxonomic dilemma if more than two of the following exceptional cases were encountered at the same time: extensive intraspecific polymorphism, interspecific morphological similarity, identical interspecific biological traits and blurred small-subunit (SSU) rDNA-based species boundaries. In the present study, spores of a species of Myxobolus Bütschli, 1882 with two morphotypes (wide type and narrow type) were collected from the gills of common carp Cyprinus carpio Linnaeus. Confusingly, the wide type was found to be identical to Myxobolus paratoyamai Kato, Kasai, Tomochi, Li & Sato, 2017 in spore morphology and SSU rDNA sequence, which confidently suggested their conspecificity; while the narrow type, was highly similar to Myxobolus toyamai Kudo, 1917 based on spore morphology and SSU rDNA sequence and thus could not be easily classified. This discordance between wide type and narrow type has caused a taxonomic dilemma. To address this problem, a hypothesis about the conspecificity of the narrow type and M. toyamai was addressed.

Notes

Written by Qingxiang Guo, [email protected], distributed without any guarantees or restrictions.

Codes

1. Pairwise distance visualization in Python

import networkx as nx

import numpy as np

import string

dt = [('len', float)]

A = np.array([(0, 0.004, 0.013, 0.034, 0.033, 0.033, 0.01),

(0.004, 0, 0.016, 0.038, 0.036, 0.036, 0.014),

(0.013, 0.016, 0, 0, 0.04, 0.04, 0.02),

(0.034, 0.038, 0.041, 0, 0.001, 0.001, 0.031),

(0.033, 0.036, 0.04, 0.001, 0, 0, 0.03),

(0.033, 0.036, 0.04, 0.001, 0, 0, 0.03),

(0.01, 0.014, 0.02, 0.031, 0.03, 0.03, 0)

])*100

A = A.view(dt)

G = nx.from_numpy_matrix(A)

G = nx.relabel_nodes(G, dict(zip(range(len(G.nodes())),string.ascii_uppercase)))

G = nx.drawing.nx_agraph.to_agraph(G)

G.node_attr.update(color="red", width="0.1",height="0.1", shape="circle")

G.edge_attr.update(color="blue", width="1.0")

G.draw('/tmp/out.pdf', format='pdf', prog='neato')

Please cite this paper as

Guo, Q., Huang, M., Liu, Y., Zhang, X., & Gu, Z. (2018). Morphological plasticity in Myxobolus Bütschli, 1882: a taxonomic dilemma case and renaming of a parasite species of the common carp. Parasites & vectors, 11(1), 1-11.

License

All source code, i.e. scripts/*.pl, scripts/*.sh or scripts/*.py are under the MIT license.

distance_visualization_python's People

Contributors

qingxiangguo avatar

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.