Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a dummy predict function #3

Open
leandroradusky opened this issue Apr 25, 2023 — with Manas.Tech Commit · 0 comments
Open

Create a dummy predict function #3

leandroradusky opened this issue Apr 25, 2023 — with Manas.Tech Commit · 0 comments

Comments

Copy link
Contributor

leandroradusky commented Apr 25, 2023

In order to start with the skeleton of our package, let's create a dummy predict function that given a list of UniProt accessions (protein IDs) & a list of GO terms, returns a CAFA-formatted pandas dataframe of predictions fulfilled with random probabilities

We can define another name for it after, but for now, let's call our package manas-cafa5.

When the package is installed we should be able to run

import predict from manas-cafa5

proteins = ["Q88YH3", "Q89GE3", ...]
go_terms = ["GO:0016787", "GO:0005515", ...]

predictions = predict(proteins, go_terms)

And then when printing the predictions var we should see the dataframe as follows:

| uniprot_acc | go_term    | probability |
| Q88YH3      | GO:0016787 |       0.213 |
| Q88YH3      | GO:0016787 |       0.832 |
| Q89GE3      | GO:0005515 |       0.054 |
| Q89GE3      | GO:0005515 |       0.934 |
| ...         | ...        | ...         |

We will use the pandas package here because it is widely used in Python to handle tabular data, all the plotting libraries accept it as input, it is easily interconvertible with numpy arrays, etc.

Here the official tutorial about python packaging: https://packaging.python.org/en/latest/tutorials/packaging-projects/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant