Git Product home page Git Product logo

ratecounter's Introduction

RateCounter

Build Status Coverage Status DOI

RateCounter is a python library and program for calculating the number of rate differences between taxa given a nexus file.

It is based on the method in:

Greenhill SJ, Hua X, Welsh CF, Schneemann H & Bromham L. 2018. [Population Size and the Rate of Language Evolution: A Test across Indo-European, Austronesian and Bantu Languages](https://www.frontiersin.org/articles/10.3389/fpsyg.2018.00576/abstract). Frontiers in Psychology doi: 10.3389/fpsyg.2018.00576

Please cite this paper if you find this software helpful.

Installation:

pip install RateCounter

Usage:

As a standalone program:

> ratecounter --help

usage: ratecounter [-h] [-v] nexus taxon1 taxon2

Calculate rates from the nexus for the two taxa

positional arguments:
  nexus          nexusfile
  taxon1         Taxon 1
  taxon2         Taxon 2

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  increases verbosity


> ratecounter test.nex Taxon1 Taxon2
              GAIN A	1
              GAIN B	1
              LOSS A	1
              LOSS B	1
             TOTAL A	2
             TOTAL B	2
             ABSENCE	1
           RETENTION	1
         SHARED GAIN	1
         SHARED LOSS	1
         UNCOUNTABLE	19
               TOTAL	27

As a python library

from ratecounter.main import RateCounter

rc = RateCounter(nexusfile=args.nexusfile)
scores = rc.get_scores(Taxon1, Taxon2)

ratecounter's People

Contributors

simongreenhill avatar

Watchers

 avatar  avatar

Forkers

hansonmenghan

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.