Skip to content

Commit

Permalink
Merge pull request #52 from ncats/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
iwwwish authored Jan 27, 2022
2 parents 52f968f + 2af9575 commit ddbef0d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
14 changes: 5 additions & 9 deletions client/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<div class="container">

<div class="inner-container" style="padding-top: 0px;">
<!--
Banner Image Attibution (License: Creative Commons CCBY - https://creativecommons.org/licenses/by/3.0/us/legalcode):
- Processing by Shocho from the Noun Project
- molecule by DinosoftLab from the Noun Project
- Neural Network by Ian Rahmadi Kurniawan from the Noun Project
- Tissue Culture Plate by Julie Ko from the Noun Project
- Scatter Plot by SBTS from the Noun Project
- Data by Alice Design from the Noun Project
-->

<img [src]="bannerImgSrc" style="width: 100%; max-height: 100%; padding-bottom: 10px;">

<br>
Expand Down Expand Up @@ -45,5 +37,9 @@ <h2>
<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>
</li>
</ol>
<br>
<p class="banner">
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>.
</p>
</div>
</div>
4 changes: 4 additions & 0 deletions client/src/app/home/home.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.banner {
font-size: 9px;
font-style: italic;
}
10 changes: 9 additions & 1 deletion server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ def predict_df(df, smi_column_name, models):
addMolsKekuleSmilesToFrame(working_df, smi_column_name)
working_df = working_df[~working_df['mols'].isnull() & ~working_df['kekule_smiles'].isnull()]

print(f'The working df size is: {working_df.shape[0]}')

if len(working_df.index) == 0:
response['hasErrors'] = True
response['errorMessages'] = 'We were not able to parse the smiles you provided'
Expand Down Expand Up @@ -258,7 +260,13 @@ def predict_df(df, smi_column_name, models):
pred_df = working_df.join(pred_df)
pred_df.drop(['mols', 'kekule_smiles'], axis=1, inplace=True)

response_df = pd.merge(df, pred_df, how='left', left_on=smi_column_name, right_on=smi_column_name)
# columns not present in original df
diff_cols = pred_df.columns.difference(df.columns)
df_res = pred_df[diff_cols]

#response_df = pd.merge(df, pred_df, how='inner', left_on=smi_column_name, right_on=smi_column_name)
# making sure the response df is of the exact same length (rows) as original df
response_df = pd.merge(df, df_res, left_index=True, right_index=True, how='inner')

errors_dict = predictor.get_errors()
response[model]['hasErrors'] = predictor.has_errors
Expand Down
2 changes: 1 addition & 1 deletion server/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<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>
<body class="mat-typography">
<adme-root></adme-root>
<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>
<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>

</body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit ddbef0d

Please sign in to comment.