fisher

Fishers Exact Test for Python (Cython)

https://github.com/brentp/fishers_exact_test

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 13 committers (23.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.2%) to scientific vocabulary

Keywords from Contributors

bioinformatics genome
Last synced: 10 months ago · JSON representation

Repository

Fishers Exact Test for Python (Cython)

Basic Info
  • Host: GitHub
  • Owner: brentp
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 431 KB
Statistics
  • Stars: 65
  • Watchers: 4
  • Forks: 23
  • Open Issues: 23
  • Releases: 0
Created over 16 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Fisher\'s Exact Test

Package image

Simple, fast implementation of Fisher\'s exact test. For example, for the following table:

| | Having the property | Not having the property | | ------------ | ------------------- | ----------------------- | | Selected | 12 | 5 | | Not selected | 29 | 2 |

Perhaps we are interested in whether there is any difference of property in selected vs. non-selected groups, then we can do the Fisher\'s exact test.

Installation

Within this folder :

git clone git://github.com/brentp/fishers_exact_test.git
pip install .

From PyPI :

pip install fisher

Or install the development version :

pip install git+git://github.com/brentp/fishers_exact_test.git

Usage

fisher.pvalue() accepts 4 values corresponding to the 2-by-2 contingency table, returns an object with attributes for lefttail, righttail, and two_tail p-values :

>>> from fisher import pvalue
>>> mat = [[12, 5], [29, 2]]
>>> p = pvalue(12, 5, 29, 2)
>>> p.left_tail, p.right_tail, p.two_tail  # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS
(0.04455473783507..., 0.994525206021..., 0.0802685520741...)

Benchmark

A simple benchmark that calls the Fisher\'s exact test 1000 times (in scripts/rfisher.py):

calling python fisher...
iterations/sec: 3000.62526381
calling rpy fisher...
iterations/sec: 289.225902364
calling R directly...
iterations/sec: 244.36542276

So the cython fisher is up to 10 times faster than rpy or R version.

Owner

  • Name: Brent Pedersen
  • Login: brentp
  • Kind: user
  • Location: Oregon, USA

Doing genomics

GitHub Events

Total
  • Issues event: 1
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 10
  • Push event: 17
  • Pull request review comment event: 8
  • Pull request review event: 2
  • Pull request event: 3
  • Fork event: 2
Last Year
  • Issues event: 1
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 10
  • Push event: 17
  • Pull request review comment event: 8
  • Pull request review event: 2
  • Pull request event: 3
  • Fork event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 42
  • Total Committers: 13
  • Avg Commits per committer: 3.231
  • Development Distribution Score (DDS): 0.548
Past Year
  • Commits: 2
  • Committers: 2
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
Brent Pedersen b****e@g****m 19
Martin Larralde m****e@e****e 6
Haibao Tang t****o@g****m 6
daler d****r@n****v 2
shouldsee s****m@g****m 1
marco.mariotti m****m@g****m 1
Sergei Lebedev s****y@g****m 1
Mikael Brandström Durling m****l@d****e 1
Joshua Adelman s****s 1
Fabio Ticconi f****i@g****m 1
Dan Bolser d****r@g****m 1
Christoph Gohlke c****e@u****u 1
mikaelb m****b@m****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 33
  • Total pull requests: 19
  • Average time to close issues: 11 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 30
  • Total pull request authors: 14
  • Average comments per issue: 2.42
  • Average comments per pull request: 2.42
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 2
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 months
  • Issue authors: 2
  • Pull request authors: 3
  • Average comments per issue: 7.5
  • Average comments per pull request: 0.67
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • timase2021 (2)
  • naman-nference (2)
  • johanneskoester (2)
  • gserrano92 (1)
  • edunham (1)
  • AndreaRMICL (1)
  • PauBadiaM (1)
  • yunesj (1)
  • i000 (1)
  • paidi (1)
  • tristanbrown (1)
  • endrebak (1)
  • davidnarganes (1)
  • deto (1)
  • marco-mariotti (1)
Pull Request Authors
  • althonos (6)
  • dbolser (2)
  • marco-mariotti (2)
  • dependabot[bot] (2)
  • superbobry (1)
  • synapticarbors (1)
  • bli25 (1)
  • daler (1)
  • fabio-t (1)
  • cgohlke (1)
  • brentp (1)
  • shouldsee (1)
  • mikdur (1)
  • tanghaibao (1)
Top Labels
Issue Labels
duplicate (1)
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 1,173 last-month
  • Total docker downloads: 18,154
  • Total dependent packages: 11
    (may contain duplicates)
  • Total dependent repositories: 42
    (may contain duplicates)
  • Total versions: 14
  • Total maintainers: 2
pypi.org: fisher

Fast Fisher's Exact Test

  • Versions: 10
  • Dependent Packages: 9
  • Dependent Repositories: 42
  • Downloads: 1,173 Last month
  • Docker Downloads: 18,154
Rankings
Dependent packages count: 1.4%
Dependent repos count: 2.3%
Docker downloads count: 3.1%
Average: 4.8%
Downloads: 5.2%
Forks count: 8.2%
Stargazers count: 8.7%
Maintainers (1)
Last synced: 10 months ago
spack.io: py-fisher

Fisher's Exact Test. Simple, fast implementation of Fisher's exact test.

  • Versions: 2
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 17.2%
Stargazers count: 20.3%
Forks count: 20.5%
Dependent packages count: 28.1%
Maintainers (1)
Last synced: 10 months ago
conda-forge.org: fisher
  • Versions: 2
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Average: 33.0%
Forks count: 33.9%
Dependent repos count: 34.0%
Stargazers count: 35.3%
Last synced: 11 months ago

Dependencies

requirements.txt pypi
  • numpy *
  • pytest *
setup.py pypi
  • numpy *