geney 1.3.71__py2.py3-none-any.whl → 1.3.72__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of geney might be problematic. Click here for more details.
geney/splicing_utils.py
CHANGED
|
@@ -597,8 +597,18 @@ def process_pairwise_epistasis_explicit(mid, engine='spliceai'):
|
|
|
597
597
|
).round(2)
|
|
598
598
|
|
|
599
599
|
# Drop columns that do not vary (only one unique value).
|
|
600
|
-
acceptors_df = acceptors_df.loc[:, acceptors_df.nunique() > 1]
|
|
601
|
-
donors_df = donors_df.loc[:, donors_df.nunique() > 1]
|
|
600
|
+
# acceptors_df = acceptors_df.loc[:, acceptors_df.nunique() > 1]
|
|
601
|
+
# donors_df = donors_df.loc[:, donors_df.nunique() > 1]
|
|
602
|
+
if (acceptors_df.nunique() > 1).any():
|
|
603
|
+
acceptors_df = acceptors_df.loc[:, acceptors_df.nunique() > 1]
|
|
604
|
+
else:
|
|
605
|
+
acceptors_df = acceptors_df.iloc[:, [0]]
|
|
606
|
+
|
|
607
|
+
# For donors_df:
|
|
608
|
+
if (donors_df.nunique() > 1).any():
|
|
609
|
+
donors_df = donors_df.loc[:, donors_df.nunique() > 1]
|
|
610
|
+
else:
|
|
611
|
+
donors_df = donors_df.iloc[:, [0]]
|
|
602
612
|
|
|
603
613
|
# Further filter acceptors: keep only columns where the value in the second row is < 0.1.
|
|
604
614
|
# (Assumes that the second row (iloc[1]) represents a specific measure you wish to threshold.)
|
|
@@ -607,13 +617,7 @@ def process_pairwise_epistasis_explicit(mid, engine='spliceai'):
|
|
|
607
617
|
def add_features_and_filter(df):
|
|
608
618
|
if df.shape[1] == 0:
|
|
609
619
|
return df # Nothing to process if no columns remain.
|
|
610
|
-
# Compute the residual:
|
|
611
|
-
# (row 3 - row 0) minus ( (row 1 - row 0) + (row 2 - row 0) )
|
|
612
620
|
df.loc['residual'] = (df.iloc[3] - df.iloc[0]) - ((df.iloc[1] - df.iloc[0]) + (df.iloc[2] - df.iloc[0]))
|
|
613
|
-
# Keep only columns where the absolute residual exceeds 0.1.
|
|
614
|
-
# df = df.loc[:, df.loc['residual'].abs() > 0.1]
|
|
615
|
-
# if df.shape[1] == 0:
|
|
616
|
-
# return df
|
|
617
621
|
# Compute deviations relative to the baseline (row 0)
|
|
618
622
|
df.loc['deviation1'] = df.iloc[1] - df.iloc[0]
|
|
619
623
|
df.loc['deviation2'] = df.iloc[2] - df.iloc[0]
|
|
@@ -631,31 +635,7 @@ def process_pairwise_epistasis_explicit(mid, engine='spliceai'):
|
|
|
631
635
|
acceptors_df.loc['site_type', :] = 1
|
|
632
636
|
|
|
633
637
|
df = pd.concat([acceptors_df, donors_df], axis=1)
|
|
634
|
-
|
|
635
|
-
# if df.shape[1] == 0:
|
|
636
|
-
# return df
|
|
637
|
-
#
|
|
638
|
-
# mask = df.apply(
|
|
639
|
-
# lambda col: (
|
|
640
|
-
# (abs(col['residual']) > 0.1) and
|
|
641
|
-
# (abs(col['deviation1'] + col['deviation2']) < 0.1)
|
|
642
|
-
# ),
|
|
643
|
-
# axis=0
|
|
644
|
-
# )
|
|
645
|
-
#
|
|
646
|
-
# df.loc['synergistic'] = 0
|
|
647
|
-
# df.loc['synergistic', mask] = 1
|
|
648
|
-
#
|
|
649
|
-
# mask = df.apply(
|
|
650
|
-
# lambda col: (
|
|
651
|
-
# (abs(col['residual']) > 0.1) and
|
|
652
|
-
# (abs(col['total_deviation']) <= 0.25)
|
|
653
|
-
# ),
|
|
654
|
-
# axis=0
|
|
655
|
-
# )
|
|
656
|
-
#
|
|
657
|
-
# df.loc['antagonistic'] = 0
|
|
658
|
-
# df.loc['antagonistic', mask] = 1
|
|
638
|
+
|
|
659
639
|
df.loc['mut_id'] = mid
|
|
660
640
|
df.loc['engine'] = engine
|
|
661
641
|
df.loc['site'] = df.columns
|
|
@@ -16,7 +16,7 @@ geney/pangolin_utils.py,sha256=9jdBXlOcRaUdfi-UpUxHA0AkTMZkUF-Lt7HVZ1nEm3s,2973
|
|
|
16
16
|
geney/power_utils.py,sha256=MehZFUdkJ2EFUot709yPEDxSkXmH5XevMebX2HD768A,7330
|
|
17
17
|
geney/seqmat_utils.py,sha256=wzb3PX5it5bpIFQvcxyzlxfhoJTbHHbsjg0rzh05iVs,19753
|
|
18
18
|
geney/spliceai_utils.py,sha256=tVY0T6F6l3fNoaktpn7Kq0oH5ZM0ThFYt9nPi_lfakw,3077
|
|
19
|
-
geney/splicing_utils.py,sha256
|
|
19
|
+
geney/splicing_utils.py,sha256=Xeji_AMEyB5Yb21E-qWoAFYHFHgZhVXZ6Xt2t1wuhsg,47240
|
|
20
20
|
geney/survival_utils.py,sha256=KnAzEviMuXh6SnVXId9PgsFLSbgkduTvYoIthxN7FPA,6886
|
|
21
21
|
geney/tcga_utils.py,sha256=D_BNHm-D_K408dlcJm3hzH2c6QNFjQsKvUcOPiQRk7g,17612
|
|
22
22
|
geney/tis_utils.py,sha256=la0CZroaKe5RgAyFd4Bf_DqQncklWgAY2823xVst98o,7813
|
|
@@ -25,7 +25,7 @@ geney/translation_initiation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
25
25
|
geney/translation_initiation/tis_utils.py,sha256=AF3siFjuQH-Rs44EV-80zHdbxRMvN4woLFSHroWIETc,4448
|
|
26
26
|
geney/translation_initiation/resources/kozak_pssm.json,sha256=pcd0Olziutq-6H3mFWDCD9cujQ_AlZO-iiOvBl82hqE,1165
|
|
27
27
|
geney/translation_initiation/resources/tis_regressor_model.joblib,sha256=IXb4DUDhJ5rBDKcqMk9zE3ECTZZcdj7Jixz3KpoZ7OA,2592025
|
|
28
|
-
geney-1.3.
|
|
29
|
-
geney-1.3.
|
|
30
|
-
geney-1.3.
|
|
31
|
-
geney-1.3.
|
|
28
|
+
geney-1.3.72.dist-info/METADATA,sha256=NgbWgh5UPWkP2EgvbJ2nASR2pbmb_lvehLtakhv4-eQ,990
|
|
29
|
+
geney-1.3.72.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
30
|
+
geney-1.3.72.dist-info/top_level.txt,sha256=O-FuNUMb5fn9dhZ-dYCgF0aZtfi1EslMstnzhc5IIVo,6
|
|
31
|
+
geney-1.3.72.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|