RAISE-RBP 0.1.4__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {raise_rbp-0.1.4/src/RAISE_RBP.egg-info → raise_rbp-0.1.6}/PKG-INFO +3 -1
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/README.md +2 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/pyproject.toml +1 -1
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/find_target.py +18 -6
- {raise_rbp-0.1.4 → raise_rbp-0.1.6/src/RAISE_RBP.egg-info}/PKG-INFO +3 -1
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/LICENSE +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/MANIFEST.in +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/data/Motif.txt +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/data/RBP-exon_network.gexf +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/data/downstream.bed +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/data/exon.bed +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/data/upstream.bed +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/setup.cfg +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/Quantas2rMATS.py +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/__init__.py +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/calculate_activity.py +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/cli.py +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/construct_network.py +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE/plot_target.py +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE_RBP.egg-info/SOURCES.txt +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE_RBP.egg-info/dependency_links.txt +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE_RBP.egg-info/requires.txt +0 -0
- {raise_rbp-0.1.4 → raise_rbp-0.1.6}/src/RAISE_RBP.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: RAISE-RBP
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: RBP Activity Inference from Splicing Events
|
|
5
5
|
Author-email: liuyilei8969 <ylliu8969@gmail.com>
|
|
6
6
|
License: GNU General Public License v3 (GPLv3)
|
|
@@ -68,6 +68,8 @@ options:
|
|
|
68
68
|
--output OUTPUT Output directory.
|
|
69
69
|
--max_iter MAX_ITER Maximum number of EM iterations.
|
|
70
70
|
--tol TOL Convergence threshold for EM.
|
|
71
|
+
--use_motif Use motif features in EM.
|
|
72
|
+
--use_clip Use clip features in EM.
|
|
71
73
|
```
|
|
72
74
|
#### 2. Construct RBP-AS network
|
|
73
75
|
```bash
|
|
@@ -45,6 +45,8 @@ options:
|
|
|
45
45
|
--output OUTPUT Output directory.
|
|
46
46
|
--max_iter MAX_ITER Maximum number of EM iterations.
|
|
47
47
|
--tol TOL Convergence threshold for EM.
|
|
48
|
+
--use_motif Use motif features in EM.
|
|
49
|
+
--use_clip Use clip features in EM.
|
|
48
50
|
```
|
|
49
51
|
#### 2. Construct RBP-AS network
|
|
50
52
|
```bash
|
|
@@ -26,6 +26,9 @@ def parse_args():
|
|
|
26
26
|
parser.add_argument('--output', type=str, required=True, help="Output directory.")
|
|
27
27
|
parser.add_argument('--max_iter', type=int, default=1000, help="Maximum number of EM iterations.")
|
|
28
28
|
parser.add_argument('--tol', type=float, default=1e-4, help="Convergence threshold for EM.")
|
|
29
|
+
parser.add_argument('--use_motif', type=str2bool, default=True, help='Use motif features in EM (True/False, default: True)')
|
|
30
|
+
parser.add_argument('--use_clip', type=str2bool, default=True, help='Use CLIP features in EM (True/False, default: True)')
|
|
31
|
+
|
|
29
32
|
return parser.parse_args()
|
|
30
33
|
|
|
31
34
|
|
|
@@ -73,7 +76,7 @@ def calculate_mean(value):
|
|
|
73
76
|
return np.mean([float(x) for x in value.split(',')])
|
|
74
77
|
|
|
75
78
|
|
|
76
|
-
def run_em(features_df, max_iter=1000, tol=1e-4):
|
|
79
|
+
def run_em(features_df, max_iter=1000, tol=1e-4, use_clip=True, use_motif=True):
|
|
77
80
|
"""
|
|
78
81
|
Run EM algorithm to estimate parameters and compute posterior P(T=1 | data).
|
|
79
82
|
"""
|
|
@@ -110,11 +113,20 @@ def run_em(features_df, max_iter=1000, tol=1e-4):
|
|
|
110
113
|
# M-step
|
|
111
114
|
pi1_new = np.mean(gamma)
|
|
112
115
|
pi0_new = 1 - pi1_new
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
# Update motif parameters
|
|
117
|
+
if use_motif:
|
|
118
|
+
p1_new = np.sum(gamma[:, None] * M, axis=0) / (np.sum(gamma) + 1e-10)
|
|
119
|
+
p0_new = np.sum((1 - gamma)[:, None] * M, axis=0) / (np.sum(1 - gamma) + 1e-10)
|
|
120
|
+
else:
|
|
121
|
+
p1_new, p0_new = p1, p0 # 保持原值
|
|
117
122
|
|
|
123
|
+
# Update CLIP parameters
|
|
124
|
+
if use_clip:
|
|
125
|
+
q1_new = np.sum(gamma[:, None] * C, axis=0) / (np.sum(gamma) + 1e-10)
|
|
126
|
+
q0_new = np.sum((1 - gamma)[:, None] * C, axis=0) / (np.sum(1 - gamma) + 1e-10)
|
|
127
|
+
else:
|
|
128
|
+
q1_new, q0_new = q1, q0
|
|
129
|
+
|
|
118
130
|
# Beta distribution parameters
|
|
119
131
|
if np.sum(gamma) > 0:
|
|
120
132
|
mu1 = np.sum(gamma * PSI) / (np.sum(gamma) + 1e-10)
|
|
@@ -248,7 +260,7 @@ def main():
|
|
|
248
260
|
"S": "PSI"
|
|
249
261
|
})
|
|
250
262
|
|
|
251
|
-
features_df, params = run_em(features_df, max_iter=args.max_iter, tol=args.tol)
|
|
263
|
+
features_df, params = run_em(features_df, max_iter=args.max_iter, tol=args.tol, use_motif=args.use_motif, use_clip=args.use_clip)
|
|
252
264
|
|
|
253
265
|
# Step 9: Save results
|
|
254
266
|
basename = f"{args.cell_line}_{args.rbp}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: RAISE-RBP
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: RBP Activity Inference from Splicing Events
|
|
5
5
|
Author-email: liuyilei8969 <ylliu8969@gmail.com>
|
|
6
6
|
License: GNU General Public License v3 (GPLv3)
|
|
@@ -68,6 +68,8 @@ options:
|
|
|
68
68
|
--output OUTPUT Output directory.
|
|
69
69
|
--max_iter MAX_ITER Maximum number of EM iterations.
|
|
70
70
|
--tol TOL Convergence threshold for EM.
|
|
71
|
+
--use_motif Use motif features in EM.
|
|
72
|
+
--use_clip Use clip features in EM.
|
|
71
73
|
```
|
|
72
74
|
#### 2. Construct RBP-AS network
|
|
73
75
|
```bash
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|