CoVIRA
CoVIRA (Consensus by Voting with Iterative Re-weighting based on Agreement) is a method to identify weights and produce consensus predictions based on a collection of results from predictors for multiple samples. It employs a iterative recalculations of weights based on the weighted "agreement" between the predictors, and allows the calculation of a final prediction as well.
This algorithm was created to help on the integration of results from multiple prediction tools in a reverse vaccinology study where no validation dataset was available for all features been inferred. Therefore, we created a unsupervised way to estimate how accurate each predictor was for that particular case considering that the more the results of a predictor is "confirmed" by the others, the higher it's accuracy.
Installing
From PyPI
$ pip install covira
From source code
$ git clone https://github.com/fredericokremer/covira
$ cd covira
$ python setup.py build
$ python setup.py install
Using
>>> import pandas as pd
>>> from covira import Covira
>>> df = pd.read_csv('test_data/dataset_1.csv')
>>> predictions = df.drop(['gene'], axis=1).values
>>> predictions # each column represents the prediction from a different tool, while each row is a different sample
array([[1, 0, 0],
[0, 1, 0],
[1, 1, 0],
[1, 0, 0],
[1, 0, 0],
[1, 0, 0],
[1, 0, 0],
[1, 0, 1]])
>>> covira = Covira(max_iterations=1000) # max number of iterations in the weight calculation
>>> covira.fit(predictions) # "fit" = calculates the weights
>>> covira.predict(predictions) # calculates the consensus prediction
array([0.1875, 0.375 , 0.5625, 0.1875, 0.1875, 0.1875, 0.1875, 0.625 ])
>>> covira.weights # weights calculated for each predictor
array([0.1875, 0.375 , 0.4375])
Reference
Grassmann AA, Kremer FS, Dos Santos JC, Souza JD, Pinto LDS, McBride AJA. Discovery of Novel Leptospirosis Vaccine Candidates Using Reverse and Structural Vaccinology. Front Immunol. 2017;8:463. Published 2017 Apr 27. doi:10.3389/fimmu.2017.00463
Release files for covira 1.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| covira-1.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Release files / covira-1.1.12-py3-none-any.whl
| Download URL | covira-1.1.12-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eaca5e92f52f687d419972baaaca07f01638bc8584c8d90841c99f19be331b93
|
|
BLAKE2b-256 checksum How to use checksums |
99065eb5d642a02b812d498a455b263cf355a8cbb5c06c2ef1b921c380162b76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
|