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

Add CLI entry point to sumsim #9

Open
ielis opened this issue Oct 25, 2023 · 0 comments
Open

Add CLI entry point to sumsim #9

ielis opened this issue Oct 25, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ielis
Copy link
Member

ielis commented Oct 25, 2023

We need a CLI entry point in the sumsim library.

Setting up the entry point is described in setuptools documentation.

We can use

The entry point should look something like this:

sumsim bench --hpo path/to/hp.json --phenopackets path/to/phenopacket/dir --output /path/to/output.csv

--hpo takes a path to HPO JSON
--phenopackets takes a path to a folder with Phenopacket JSON files. The code can expect that phenopackets are the only files in the folder
--output where to write the table with disease ranks

The CLI can take other options as necessary (e.g. a table with precomputed term IC values?)

I think, we can make our life simpler if we make sumsim bench create a table with ranks of all phenopackets:

subject_id  disease_id,      p_val    score    whatever
patient_a   OMIM:256000      0.0001   12.3     blabla
patient_a   OMIM:123456      0.001     10.3    other
patient_a   OMIM:234567      0.212     12.3    blabla
...
patient_b   OMIM:256000      0.0001   12.3     blabla
patient_b   OMIM:111111      0.3254   12.3     blabla

Diseases for a patient are sorted such that the most likely disease is at the top. The table is a stack of sub-tables with diseases per patient

I think CSV is the best format since it is has out of the box support by pandas.

@ielis ielis added the enhancement New feature or request label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant