Skip to content

Commit

Permalink
pypi release
Browse files Browse the repository at this point in the history
  • Loading branch information
andim committed Aug 4, 2022
1 parent a73e9a3 commit 82a445d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributing

You are cordially invited to contribute to the further development of noisyopt! There are various ways of contributing (improving documentation, fixing bugs, and extending functionality) all of which are very welcome.

Simply hack away and open a Pull request. Alternatively open an issue if you want to discuss your idea first.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Andreas Mayer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
[![License](https://img.shields.io/pypi/l/pyrepseq.svg)](https://github.com/andim/pyrepseq/blob/master/LICENSE)
[![Latest release](https://img.shields.io/pypi/v/pyrepseq.svg)](https://pypi.python.org/pypi/pyrepseq)

# Pyrepseq: A python library for immune repertoire analyses

## Installation

Pyrepseq can be installed by obtaining the source code from [Github](https://github.com/andim/pyrepseq) and running `python setup.py install` in the main directory. If you install from source, you first need to install `numpy` and `scipy` if these packages are not already installed.

## Unit testing

The module comes with a number of unit tests to increase robustness. This can be run by typing `py.test` in the top-level directory.

## Support and contributing

For bug reports and enhancement requests use the [Github issue tool](http://github.com/andim/pyrepseq/issues/new), or (even better!) open a [pull request](http://github.com/andim/pyrepseq/pulls) with relevant changes. If you have any questions don't hesitate to contact me by email (andimscience@gmail.com) or Twitter ([@andimscience](http://twitter.com/andimscience)).

You can run the testsuite by running `pytest` in the top-level directory.

You are cordially invited to [contribute](https://github.com/andim/pyrepseq/blob/master/CONTRIBUTING.md) to the further development of pyrepseq!
12 changes: 5 additions & 7 deletions pyrepseq/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,11 @@ def mle_alpha_discrete(c, cmin=1.0, **kwargs):
return result.x

def coincidence_probability(array):
"""
Estimates the coincidence probability p_C from a sample.
p_C is equal to the probability that two distinct sampled elements are the same.
If n_i are the counts of the i-th unique element and
N = \sum_i n_i the length of the array, then:
p_C = \sum_i n_i (n_i-1)/(N(N-1))
r"""Estimate the coincidence probability :math:`p_C` from a sample.
:math:`p_C` is equal to the probability that two distinct sampled elements are the same.
If :math:`n_i` are the counts of the i-th unique element and
:math:`N = \sum_i n_i` the length of the array, then:
:math:`p_C = \sum_i n_i (n_i-1)/(N(N-1))`
Note: This measure is also known as the Simpson or Hunter-Gaston index
"""
Expand Down

0 comments on commit 82a445d

Please sign in to comment.