Skip to content

Commit

Permalink
UPDATE texts and FIX data ret. bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
furkanmtorun committed Oct 1, 2020
1 parent b832567 commit fd53034
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions gnomad_api_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
st.info("""
- This API tool uses [gnomAD GraphQL backend service](https://gnomad.broadinstitute.org/api).
- Upload your .csv/tsv/txt file containing the single type of identifiers as one column.
- Each row should correspond to single record (i.e. gene name, gene ID, rsID, transcript ID).
- Each row should correspond to single record (i.e. gene name, gene ID, transcript ID or rsID).
- By using the app, you agree that you accepting [the disclaimer](https://github.com/furkanmtorun/gnomad_python_api#hash-disclaimer).
""")

Expand Down Expand Up @@ -920,13 +920,13 @@ def generate_plot(search_by, filter_by, mode):
except AttributeError as ae:

# Error Message from gnomAD
if filter_by != 'rs_id':
try:
for msg in response.json()["errors"]:
st.error("Errors from gnomAD for your process:\n\t" + msg["message"])
except Exception as anyOtherException:
pass

try:
for msg in response.json()["errors"]:
st.error("Errors from gnomAD for your process:\n\t" + msg["message"])
except Exception as anyOtherException:
pass

if filter_by != "rs_id":
# General Error Message
st.warning("""
It might be caused since the search did not find a result from the database.
Expand All @@ -939,8 +939,6 @@ def generate_plot(search_by, filter_by, mode):
>
> If you think this should not occur, you can contact with developer to issue this problem on Github page.
""".format(ae))
else:
pass

except (TypeError, KeyError):
try:
Expand Down

0 comments on commit fd53034

Please sign in to comment.