Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanuc committed Jun 29, 2024
1 parent 5c978e5 commit 0580e42
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
19 changes: 19 additions & 0 deletions build/lib/emergenet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Emergenet: Fast Scalable Emergence Risk Assessment of Influenza A Strains Circulating In Non-human Hosts
Emergenet is a general tool to infer digital twins of the wild viral evolutionary dynamics. The current implementation targets Influenza A strains circulating in non-human hosts to ranl-order strains according to their risk of emergence.
The underlying theory is based on uncovering an intrinsic distancebetween viral strains that scales with the probability of spontaneous jump in the wild.
---
## Installation:
```
pip install emergenet
```
## Notes:
Depends on the `quasinet` package
"""
7 changes: 5 additions & 2 deletions build/lib/emergenet/emergenet.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
Emergenet: Fast Scalable Emergence Risk Assessment of Influenza A Strains Circulating In Non-human Hosts
"""
import re, os, json, joblib
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -167,7 +170,7 @@ def _compute_risks(self, segment:str, seq_df:pd.DataFrame, enet:Qnet) -> pd.Data
elif segment == 'NA':
TRUNC = NA_TRUNC
target_seq = np.array(list(self.na_seq[:TRUNC]))
qdist = qdistance_matrix(np.array([target_seq]), seq_arr, enet, enet)
qdist = qdistance_matrix(seq_arr, np.array([target_seq]), enet, enet)
seq_df['risk'] = qdist[0]
return seq_df

Expand Down Expand Up @@ -392,4 +395,4 @@ def predict_irat_emergence(ha_risk:float, na_risk:float) -> Tuple[float, float,
irat_emergence_low = emergence_low_model['intercept'] + emergence_low_model['slope'] * x
irat_emergence_high = emergence_high_model['intercept'] + emergence_high_model['slope'] * x
return irat_emergence, irat_emergence_low, irat_emergence_high


4 changes: 2 additions & 2 deletions emergenet.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Metadata-Version: 2.1
Name: emergenet
Version: 0.4.2
Version: 0.4.3
Summary: Superfast Risk Estimation of Emerging Pathogens
Home-page: https://github.com/zeroknowledgediscovery/emergenet
Download-URL: https://github.com/zeroknowledgediscovery/emergenet/archive/0.4.2.tar.gz
Download-URL: https://github.com/zeroknowledgediscovery/emergenet/archive/0.4.3.tar.gz
Author: zed.uchicago.edu
Author-email: [email protected]
License: LICENSE
Expand Down
1 change: 1 addition & 0 deletions tex/overleaf
Submodule overleaf added at 735e0c

0 comments on commit 0580e42

Please sign in to comment.