-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard to present the COVID19 submissions to ENA by country #20
base: master
Are you sure you want to change the base?
Conversation
First version of the dashboard fetching reads and sequences from advance search ( public data only ) fetching the rest of the reads ( cancelled, suppressed and private) from ERAPRO Graph tab contains Public reads and sequences Stats tab contains only reads ( public, private, suppressed, cancelled)
cx_Oracle.init_oracle_client(lib_dir=client_lib_dir) | ||
connection = None | ||
try: | ||
dsn = cx_Oracle.makedsn("ora-vm-009.ebi.ac.uk", 1541, service_name="ERAPRO") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a public repository, maybe best to put the database information in a config YAML file and retrieve them from there before calling here. In the GitHub repository, you'd have an empty config file, but your local one can include the information. This way we won't be exposing the database information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably good practice, but here we've only got readonly access information, plus the dbs are behind the firewall, so it's probably not really too risky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good! Just one suggestion, as I commented, which is about the best way to handle the database connection information. Let me know if you have any questions or need any clarifications.
Generally, I think in the future, you can even start to implement one or two class objects, as there are a number of functions which call each other. But this can be for later down the line in the future.
This dashboard might be better off as a standalone repository, rather than as part of this repo (unless there's scripts here that you're calling within your app? I couldn't see any at first glance). At the very least, it should all go into its own directory, e.g. Additionally, |
if x == y: | ||
df_mod.at[x, column_x] = np.nan | ||
return df_mod | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost everything above here could move to utils.py
(or whatever you want to name it)
First version of the dashboard
fetching reads and sequences from advance search ( public data only )
fetching the rest of the reads ( cancelled, suppressed and private) from ERAPRO
Graph tab contains Public reads and sequences
Stats tab contains only reads ( public, private, suppressed, cancelled)