{"id":15060845,"url":"https://github.com/freymaurer/pysafe","last_synced_at":"2026-02-06T07:34:46.927Z","repository":{"id":239616006,"uuid":"787243277","full_name":"Freymaurer/PySAFE","owner":"Freymaurer","description":"A web service for ml prediction. Using SAFE stack, fastapi, websockets, daisyui.","archived":false,"fork":false,"pushed_at":"2024-05-13T14:42:34.000Z","size":70683,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T22:35:15.260Z","etag":null,"topics":["aspnetcore","daisyui","data-science","fable","fastapi","fsharp","ml","python","safe-stack"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Freymaurer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-16T06:49:36.000Z","updated_at":"2024-05-13T15:42:07.000Z","dependencies_parsed_at":"2024-05-13T17:28:18.032Z","dependency_job_id":null,"html_url":"https://github.com/Freymaurer/PySAFE","commit_stats":null,"previous_names":["freymaurer/pysafe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freymaurer%2FPySAFE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freymaurer%2FPySAFE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freymaurer%2FPySAFE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freymaurer%2FPySAFE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freymaurer","download_url":"https://codeload.github.com/Freymaurer/PySAFE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701312,"owners_count":20333616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnetcore","daisyui","data-science","fable","fastapi","fsharp","ml","python","safe-stack"],"created_at":"2024-09-24T23:05:27.089Z","updated_at":"2026-02-06T07:34:46.871Z","avatar_url":"https://github.com/Freymaurer.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PySAFE\n\n![image](https://github.com/Freymaurer/PySAFE/assets/39732517/08553f30-f1d8-4457-9060-95e48e18dc32)\n\n# Local Development\n\n## Install pre-requisites\n\nYou'll need to install the following pre-requisites in order to build SAFE applications\n\n* [.NET SDK](https://www.microsoft.com/net/download) 8.0 or higher\n* [Node 18](https://nodejs.org/en/download/) or higher\n* [NPM 9](https://www.npmjs.com/package/npm) or higher\n* [Python 3.10](https://www.python.org/downloads/) or higher\n\n## Install\n\n- run `setup.cmd`\n\n.. __or__ ..\n  \n1. `dotnet tool restore`\n2. `py -m venv .venv`\n3. `.\\.venv\\Scripts\\python.exe -m pip install -r .\\src\\FastAPI\\requirements.txt`\n\n## Run\n\n- `.\\build.cmd run` starts SAFE stack\n\nplus in another terminal run:\n\n1. activate local python environment: `.\\.venv\\Scripts\\Activate.ps1`\n2. navigate to fastapi folder: `cd .\\src\\FastAPI\\`\n3. start fastapi backend: `python -m uvicorn app.main:app --reload`\n\n## Activate Email notification (optional)\n\nSet user-secrets in the following schema:\n\n```json\n{\n  \"email\": {\n    \"NET_EMAIL_EMAIL\": \"placeholder@mail.de\",\n    \"NET_EMAIL_ACCOUNTNAME\": \"PlaceholderAccountName\",\n    \"NET_EMAIL_PASSWORD\": \"HelloWorld1234\",\n    \"NET_EMAIL_SERVER\": \"smtp.placeholdermail.de\",\n    \"NET_EMAIL_PORT\": 587\n  }\n}\n```\n\n# Request Workflow\n\n```mermaid\nsequenceDiagram\n    participant py as Python ML\n    participant net as F#35; Server\n    participant c as Client\n    actor u as User\n    u --\u003e\u003e c: Gives data\n    c --\u003e\u003e+net: sends user data\n    par start analysis\n    net-)+py: sends data, trigger eval\n    py-)net: returns binned data\n    and return request information\n    net -) c: returns `request-ID`\n    end\n    critical ⚠️\n    u --\u003e\u003e c: copies and stores `request-ID`\n    end\n    opt email\n    u --\u003e\u003e c: give email address\n    c --\u003e\u003e net: give id + email to store\n    end\n    opt check status\n    u --\u003e\u003e c: use `request-ID` to check status\n    end\n    py-)net: send last package\n    deactivate py\n    net--\u003e\u003enet: run q-value calculation\n    net--\u003e\u003enet: store results\n    deactivate net\n    opt gave email\n    net-)u: send email\n    end\n    u --\u003e\u003e c: request data\n    c--\u003e\u003enet: get data\n    net--\u003e\u003ec: return data\n    c--\u003e\u003eu: download data\n```\n\n# Result\n\nExplanations of Chloropred ,Qchloro, Mitopred,Qmito,Secrpred,Qsecr, and FinalPred.\n\n### Chloropred\n\nPrediction score indicating the likelihood of the protein being localized to the Chloroplast. A higher scores suggest a stronger prediction that the protein is localized in the Chloroplast.\n\n### Qchloro\n\nq-value associated with the Chloroplast prediction score. Provides a measure of statistical significance for the Chloroplast prediction. Lower q-values indicate higher statistical significance.\n\n### Mitopred\nPrediction score for the localization of the protein to the Mitochondria. A higher scores suggest a stronger prediction of Mitochondrial localization.\n\n### Qmito\nq-value associated with the Mitochondria prediction score. Indicates the statistical significance of the Mitochondria localization prediction. Lower q-values suggest a more reliable prediction.\n\n### Secrpred\nPrediction score for identifying the protein as a Secretory Protein.A higher scores indicate a stronger likelihood that the protein functions as a Secretory Protein.\n\n### Qsecr\nq-value for the Secretory Protein prediction. Provides a measure of the statistical significance of the Secretory Protein prediction. Lower q-values are indicative of more statistically significant predictions.\n\n### FinalPred\nRepresents the model's final prediction of the protein's localization based on the highest score and its corresponding q-value. The final localization is determined by comparing the q-values and prediction scores against preset cutoffs. If all q-values exceed the cutoff, the protein is classified as \"Cytoplasmic.\"\n\n### Cutoff\nThe threshold q-value below which a prediction is considered statistically significant. Set to 0.05 by default, meaning that predictions with q-values below this threshold are classified as significant. This parameter helps in distinguishing between statistically significant and non-significant predictions, reducing the chance of false-positive localizations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreymaurer%2Fpysafe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreymaurer%2Fpysafe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreymaurer%2Fpysafe/lists"}