Spaces:
Sleeping
Sleeping
Commit
·
037b3d4
1
Parent(s):
c73e4be
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ import shap
|
|
8 |
st.set_option('deprecation.showPyplotGlobalUse', False)
|
9 |
seed=42
|
10 |
|
11 |
-
|
12 |
-
|
13 |
|
14 |
training_data = pd.read_csv("./selected_features_training_data.csv", header=0)
|
15 |
training_data.columns = [
|
@@ -34,12 +34,14 @@ xgb = xgboost.XGBRegressor(
|
|
34 |
|
35 |
xgb.fit(X, Y)
|
36 |
|
37 |
-
|
38 |
-
predictions = [round(
|
39 |
|
40 |
-
output = pd.Series(data=predictions, index=
|
41 |
-
df_total = pd.concat([
|
42 |
-
df_total
|
|
|
|
|
43 |
|
44 |
df_total = df_total[['XGB_Score', 'mousescore_Exomiser',
|
45 |
'SDI', 'Liver_GTExTPM', 'pLI_ExAC',
|
|
|
8 |
st.set_option('deprecation.showPyplotGlobalUse', False)
|
9 |
seed=42
|
10 |
|
11 |
+
annotations = pd.read_csv("annotations_dataset.csv")
|
12 |
+
annotations = annotations.set_index("Gene")
|
13 |
|
14 |
training_data = pd.read_csv("./selected_features_training_data.csv", header=0)
|
15 |
training_data.columns = [
|
|
|
34 |
|
35 |
xgb.fit(X, Y)
|
36 |
|
37 |
+
prediction_list = list(xgb.predict(data))
|
38 |
+
predictions = [round(prediction, 2) for prediction in prediction_list]
|
39 |
|
40 |
+
output = pd.Series(data=predictions, index=annotations.index, name="XGB_Score")
|
41 |
+
df_total = pd.concat([annotations, output], axis=1)
|
42 |
+
#df_total['Gene'] = df_total.index
|
43 |
+
#df_total.reset_index()
|
44 |
+
df_total.rename_axis('Gene')
|
45 |
|
46 |
df_total = df_total[['XGB_Score', 'mousescore_Exomiser',
|
47 |
'SDI', 'Liver_GTExTPM', 'pLI_ExAC',
|