Skip to content

Commit ddbef0d

Browse files
authored
Merge pull request #52 from ncats/development
Development
2 parents 52f968f + 2af9575 commit ddbef0d

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

client/src/app/home/home.component.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
<div class="container">
22

33
<div class="inner-container" style="padding-top: 0px;">
4-
<!--
5-
Banner Image Attibution (License: Creative Commons CCBY - https://creativecommons.org/licenses/by/3.0/us/legalcode):
6-
- Processing by Shocho from the Noun Project
7-
- molecule by DinosoftLab from the Noun Project
8-
- Neural Network by Ian Rahmadi Kurniawan from the Noun Project
9-
- Tissue Culture Plate by Julie Ko from the Noun Project
10-
- Scatter Plot by SBTS from the Noun Project
11-
- Data by Alice Design from the Noun Project
12-
-->
4+
135
<img [src]="bannerImgSrc" style="width: 100%; max-height: 100%; padding-bottom: 10px;">
146

157
<br>
@@ -45,5 +37,9 @@ <h2>
4537
<p>Shah, P., Siramshetty, V.B., Zakharov, A.V. et al., <a href="https://doi.org/10.1186/s13321-020-00426-7" target="_blank">Predicting liver cytosol stability of small molecules.</a> <i> J Cheminform.</i> 12, 21 (2020).</p>
4638
</li>
4739
</ol>
40+
<br>
41+
<p class="banner">
42+
Banner icons are from <a href="https://thenounproject.com/" target="_blank">NounProject.com</a>: Processing by Shocho; Molecule by DinosoftLab; Neural Network by Ian Rahmadi Kurniawan; Tissue Culture by Julie Ko; Scatter Plot by SBTS; Data by Alice design. All icons are licensed under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.
43+
</p>
4844
</div>
4945
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.banner {
2+
font-size: 9px;
3+
font-style: italic;
4+
}

server/app.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ def predict_df(df, smi_column_name, models):
226226
addMolsKekuleSmilesToFrame(working_df, smi_column_name)
227227
working_df = working_df[~working_df['mols'].isnull() & ~working_df['kekule_smiles'].isnull()]
228228

229+
print(f'The working df size is: {working_df.shape[0]}')
230+
229231
if len(working_df.index) == 0:
230232
response['hasErrors'] = True
231233
response['errorMessages'] = 'We were not able to parse the smiles you provided'
@@ -258,7 +260,13 @@ def predict_df(df, smi_column_name, models):
258260
pred_df = working_df.join(pred_df)
259261
pred_df.drop(['mols', 'kekule_smiles'], axis=1, inplace=True)
260262

261-
response_df = pd.merge(df, pred_df, how='left', left_on=smi_column_name, right_on=smi_column_name)
263+
# columns not present in original df
264+
diff_cols = pred_df.columns.difference(df.columns)
265+
df_res = pred_df[diff_cols]
266+
267+
#response_df = pd.merge(df, pred_df, how='inner', left_on=smi_column_name, right_on=smi_column_name)
268+
# making sure the response df is of the exact same length (rows) as original df
269+
response_df = pd.merge(df, df_res, left_index=True, right_index=True, how='inner')
262270

263271
errors_dict = predictor.get_errors()
264272
response[model]['hasErrors'] = predictor.has_errors

server/client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
<style>.mat-typography{font:400 14px/20px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;}body,html{height:100%;}body{margin:0;font-family:Roboto,Helvetica Neue,sans-serif;}</style><link rel="stylesheet" href="/client/styles.2f98c1b7357ecd32411f.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="/client/styles.2f98c1b7357ecd32411f.css"></noscript></head>
1717
<body class="mat-typography">
1818
<adme-root></adme-root>
19-
<script src="/client/runtime-es2015.4ecd957143422332d4bf.js" type="module"></script><script src="/client/runtime-es5.4ecd957143422332d4bf.js" nomodule defer></script><script src="/client/polyfills-es5.d3a248958c9952e88ffa.js" nomodule defer></script><script src="/client/polyfills-es2015.1ea406a531d69c32d225.js" type="module"></script><script src="/client/main-es2015.0202f1e592c4d08d6334.js" type="module"></script><script src="/client/main-es5.0202f1e592c4d08d6334.js" nomodule defer></script>
19+
<script src="/client/runtime-es2015.4ecd957143422332d4bf.js" type="module"></script><script src="/client/runtime-es5.4ecd957143422332d4bf.js" nomodule defer></script><script src="/client/polyfills-es5.d3a248958c9952e88ffa.js" nomodule defer></script><script src="/client/polyfills-es2015.1ea406a531d69c32d225.js" type="module"></script><script src="/client/main-es2015.4755f04aab5d070cec1b.js" type="module"></script><script src="/client/main-es5.4755f04aab5d070cec1b.js" nomodule defer></script>
2020

2121
</body></html>

server/client/main-es2015.0202f1e592c4d08d6334.js renamed to server/client/main-es2015.4755f04aab5d070cec1b.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/client/main-es5.0202f1e592c4d08d6334.js renamed to server/client/main-es5.4755f04aab5d070cec1b.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)