Skip to content
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

Node menu inactivated after loading network from database #977

Closed
kdahlquist opened this issue Sep 7, 2022 · 18 comments
Closed

Node menu inactivated after loading network from database #977

kdahlquist opened this issue Sep 7, 2022 · 18 comments

Comments

@kdahlquist
Copy link
Collaborator

If the first thing I do upon landing on the GRNsight page is to load a network from a database, the node menu is disabled, so I am unable to color the nodes with expression data from the expression database.

I think that now that we have an expression database, the node menu should always be enabled because even if a user doesn't have their own data, they can use the database data.

@dondi
Copy link
Owner

dondi commented Sep 7, 2022

Although it is possible to work around this by loading a demo first, and then loading a network from a database, there is now a follow-up issue where node coloring actually doesn’t take place until a dataset is chosen

@ahmad00m
Copy link
Collaborator

I believe if the node coloring should always be enabled this function need to be always enabled. This function is in setup-handlers.js, I tried to test it on localhost but I could not connect to it through the multiple attempts I made. So, first I hope to troubleshoot connecting to localhost and then check whether this is the right piece of code that needs to be changed.

Screen Shot 2022-09-14 at 4 56 44 AM

@ahmad00m
Copy link
Collaborator

UPDATE
I tried to run the localhost on my laptop and it was able to connect to the server; however, I still got an error in my console and I was unable to load demos.

Screen Shot 2022-09-14 at 9 25 17 AM

@dondi
Copy link
Owner

dondi commented Sep 14, 2022

@ahmad00m Regarding node coloring, I would agree that it is appropriate for it to be always enabled now, except where there is no network loaded

Go ahead and start a branch to work on it, or possible pair w/ @Sarronnn since she will also benefit from doing more of these types of fixes

@dondi
Copy link
Owner

dondi commented Sep 14, 2022

For the demo errors, both @Onariaginosa and @dondi confirmed that their local builds are loading demos successfully, so that looks like a localized issue

@dondi
Copy link
Owner

dondi commented Sep 14, 2022

Local build remains unresolved but bug fix could be done as a pair w/ @Sarronnn

@dondi
Copy link
Owner

dondi commented Sep 14, 2022

Local issue with @ahmad00m has been fixed. Turns out that it was a specific problem with Node 17. Switching to Node 16 or 18 resolves it; @ahmad00m chose to go to 18 and GRNsight ran successfully

@ahmad00m
Copy link
Collaborator

Here is the linked that helped resolve this issue.
https://stackoverflow.com/a/69789658

@dondi
Copy link
Owner

dondi commented Sep 15, 2022

Thanks! I have updated the wiki.

@Sarronnn
Copy link
Collaborator

I wanted to first try @ahmad00m 's fix. But the local host can not connect to the database since it is local, therefore I am not able to see changes I made to the code unless I change my branch to beta.

  • Does changing my branch to beta mean creating a pull request from beta?
  • What does tunnel with SSH key mean? How do I tunnel with SSH key?

Big thank you to @ahmad00m for all the help so far!

@kdahlquist
Copy link
Collaborator Author

@Sarronnn, I could be wrong, but I think you need to pull the beta code into your branch. This is always a good idea so that you can make sure that your code is up-to-date and also to make sure that there are not any conflicts with what you are doing. I also think that you will need to run a local copy of the database when you are running your code locally.

@dondi or @Onariaginosa can chime in if I'm wrong or to clarify the process.

@ahmad00m
Copy link
Collaborator

This bug is associated with database and in order to determine the change in code fixes the bug we need to tunnel to database using the ssh key or make a pull request to merge with beta (if you are sure the code written fixes the bug). Thanks to @Onariaginosa for spending time to teach me how to do this process, but as of right now the primary fix didn't fix this issue and I require more time to look where the code needs to be changed. I have some time later in the week to meet with @Sarronnn to go over the process and perhaps fix this bug together.

@dondi
Copy link
Owner

dondi commented Sep 21, 2022

After discussing this issue during the meeting, the preferred approach for developers on the team will be to install and run their own copy of PostgreSQL on their respective devices

@Onariaginosa, @ahmad00m, and @Sarronnn will plan a meeting during the week to walk through process, with @dondi being available to consult just in case. Original data files have been linked to under separate cover and may need to updated to @Onariaginosa’s latest copy

We will also take advantage of this to review our database documentation and loader scripts in the database folder of the repository. The hope is to get the documentation to a point where new members can also walk through it in order to get up and running (perhaps something for @ntran18 to try in the future)

@dondi
Copy link
Owner

dondi commented Sep 21, 2022

Above comment has been pulled out as a separate issue, #988

@ahmad00m
Copy link
Collaborator

I believe this issue is resolved. I was able to locate the node coloring function in the update-app.js and make it to be always on (it will default to expression data from Barreto_2012_wt data) when genes are being selected from database.

Here is how it looks. I can also demonstrate this during the meeting.
1

2

@Sarronnn
Copy link
Collaborator

Sarronnn commented Oct 12, 2022

  • When searching for genes in "Load Database", there was no result:
    Screen Shot 2022-10-12 at 10 03 14 AM
    • So, I had to check to see if the database was set up correctly.
      • To do this, I had to directly inspect the tables by running some SQL queries.

@Sarronnn
Copy link
Collaborator

Sarronnn commented Oct 12, 2022

  • Met with Ona to go over how to run some SQL queries to directly inspect the tables.

  • I made sure I was checking the spring2022 schema and not the public.

    Screen Shot 2022-10-12 at 10 15 57 AM Screen Shot 2022-10-12 at 10 16 09 AM
  • Database was not empty: But why is it still not finding the gene?

  • Also pulled from Ona's branch and tried:

    • Same error persisted:

      Screen Shot 2022-10-12 at 10 20 08 AM

@dondi
Copy link
Owner

dondi commented Nov 2, 2022

Already merged and placed in beta; got distracted by time zone issue

@dondi dondi closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants