GithubHelp home page GithubHelp logo

yeolab / anchor Goto Github PK

View Code? Open in Web Editor NEW
25.0 17.0 12.0 1.72 MB

:anchor: Find bimodal, unimodal, and multimodal features in your data

Home Page: https://yeolab.github.io/anchor

License: BSD 3-Clause "New" or "Revised" License

Makefile 3.14% Python 96.86%

anchor's Introduction

Anchor logo

codecov

What is anchor?

Anchor is a python package to find unimodal, bimodal, and multimodal features in any data that is normalized between 0 and 1, for example alternative splicing or other percent-based units.

Installation

To install anchor, we recommend using the Anaconda Python Distribution and creating an environment, so the anchor code and dependencies don't interfere with anything else. Here is the command to create an environment:

conda create -n anchor-env pandas scipy numpy matplotlib seaborn

Stable (recommended)

To install this code from the Python Package Index, you'll need to specify anchor-bio (anchor was already taken - boo).

pip install anchor-bio

Bleeding-edge (for the brave)

If you want the latest and greatest version, clone this github repository and use pip to install

git clone [email protected]:YeoLab/anchor
cd anchor
pip install .  # The "." means "install *this*, the folder where I am now"

Usage

anchor was structured like scikit-learn, where if you want the "final answer" of your estimator, you use fit_transform(), but if you want to see the intermediates, you use fit().

If you want the modality assignments for your data, first make sure that you have a pandas.DataFrame, here it is called data, in the format (samples, features). This uses a log2 Bayes Factor cutoff of 5, and the default Beta distribution parameterizations (shown here)

import anchor

bm = anchor.BayesianModalities()
modalities = bm.fit_transform(data)

If you want to see all the intermediate Bayes factors, then you can do:

import anchor

bm = anchor.BayesianModalities()
bayes_factors = bm.fit(data)

History

1.1.1 (2017-06-29)

  • In infotheory.binify, round the decimal numbers before they are written as strings

1.0.1 (2017-06-28)

  • Documentation and build fixes

1.0.0 (2017-06-28)

  • Updated to Python 3.5, 3.6

0.1.0 (2015-07-08)

  • First release on PyPI.

anchor's People

Contributors

olgabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.