dondi / GRNsight

Web app and service for modeling and visualizing gene regulatory networks.
http://dondi.github.io/GRNsight
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Get GRNsight running locally on your machine #1046

Closed dondi closed 12 months ago

dondi commented 1 year ago

Follow the Initial Setup wiki page: https://github.com/dondi/GRNsight/wiki/Initial-Setup

Take note of any inconsistencies/missing sections (e.g., Windows-specific variants) and we can edit the wiki page accordingly

nchun2 commented 1 year ago

I don't want to make changes to the wiki page until I get confirmation for what I am doing, but while I was following the wiki some things came up and I will note them below so I don't forget.

dondi commented 1 year ago
nchun2 commented 1 year ago

I meet with @dondi and we were able to get GRNsight running with a few tweaks to the documentation.

Dondi explained to me that these errors could be because I have a PC or because of my specific laptop so we don't know if these fixes are necessary to add to the documentation or if other issues would come up in the future. @kdahlquist If you have a lab laptop that I could borrow, he thinks it would be a good idea to run through the documentation again now with my notes, so we could make adjustments to the file for more detailed instructions that are PC specific.

kdahlquist commented 1 year ago

@nchun2, when did you want to work on this? My laptop is at home, so I would need to bring it to work. I might be able to swing by today and pick it up if you wanted to work today, but it would be easier to set a different day to work on this. Let me know.

nchun2 commented 1 year ago

@kdahlquist, sometime next week would work so you don't have to be rushing back and forth. Could I work on it Monday afternoon? I am free between 2 and 3:30 pm. I could also do Tuesday after our meeting because I don't begin class until 12 pm.

kdahlquist commented 1 year ago

Monday is fine. I'll have to remember to bring it :) Tuesday morning is the backup if I don't.

kdahlquist commented 1 year ago

I brought the laptop. @nchun2 , I'll see you in my office at 2:00.

nchun2 commented 1 year ago

New error when doing 'py generate_network.py': Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\intermine\webservice.py", line 9, in
from urlparse import urlparse ModuleNotFoundError: No module named 'urlparse'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\kdahlqui\Desktop\GRNsight\database\network-database\scripts\generate_network.py", line 3, in
from intermine.webservice import Service
File "C:\Python311\Lib\site-packages\intermine\webservice.py", line 16, in
from collections import MutableMapping as DictMixin ImportError: cannot import name 'MutableMapping' from 'collections' (C:\Python311\Lib\collections__init__.py) PS C:\Users\kdahlqui\Desktop\GRNsight\database\network-database\scripts>

dondi commented 1 year ago

@nchun2 is in the middle of this process and taking notes along the way. Don’t hesitate to post screenshots to this thread in case you want to ask about something

The end goal is to see, after going through this installation procedure twice on different Windows machines, what variations/steps should be documented as part of the standard flow vs. what steps might be unique to specific machines and perhaps those steps can be listed in a side section (e.g., Troubleshooting or Notes)

nchun2 commented 1 year ago

I have been trying to look for solutions to the following issue online, but I cannot find anything. @dondi do you know any solution to this? Screenshot (1) This is the last step, and up until now the issues have been similar.

dondi commented 1 year ago

I have been unable to find solid leads on this—there’s no reference to options.cwd in our code (that I could find). The closest thing I could spot is this issue from 2018, resolved in 2022 😮 https://github.com/nodejs/node/issues/22630

The discussion appears to hint that the issue is version-related, so the best I can think of is to double-check versions between the two machines to see if there are any mismatches

dondi commented 1 year ago

Upon comparing notes it looks like @nchun2 had different versions of NodeJS running on her computer vs. @kdahlquist’s. The goal is to do this step on as close to an identical platform possible. To check if the version is an issue, one of the following can be tried:

To truly isolate if versioning is an issue, if either of the above steps produces the expected change, ideally @nchun2 then reverts the step and observes the prior behavior again. Taking this second step will help strengthen the possibility that the root cause was indeed the Node version as opposed to some side effect of the upgrade/downgrade process

nchun2 commented 1 year ago

@dondi I reinstalled Node so now both my computers and Dr. Dahlquist's are running the same version, but when I reran the command it gave me a new error (node:internal/modules/cjs/loader:1080 throw err;). I followed this website's guidelines (https://bobbyhadz.com/blog/javascript-cannot-find-module-loader-js) to fix it and I think it helped, but now I am getting the following error. Screenshot (2) Screenshot (3) I checked online to find solutions, but I haven't been able to find anything useful.

dondi commented 1 year ago

@nchun2 the first error, EADDRINUSE, is very likely due to an existing GRNsight server that is already running on the machine. I would recommend looking at all of your command-line windows to make sure that there isn’t another one that’s still executing. If you can’t find one, go to the Task Manager (Ctrl-Alt-Del) and terminate any instances of node that you might see

The second error about google.analytics is not a function may or may not be a side effect to the first one—let’s resolve EADDRINUSE first then see if the second one still shows up after that

dondi commented 1 year ago

To check the version of a command, add --version after the command name:

node --version
npm --version
dondi commented 1 year ago

If execution issues persist @nchun2 will arrange to meet up with @dondi so that they can troubleshoot the systems in person

nchun2 commented 1 year ago

If you have an error installing google analysics, delete the node-modules folder from the GRNsight folder and then redo the npm install command. Make sure no instances of node are running during this from task manager.

If you get the following error use < npm install --save-dev parallelshell@3.0.1> TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string or an instance of Buffer or URL. Received function wrappedCwd at normalizeSpawnArguments (node:child_process:576:11) at spawn (node:child_process:754:13) at C:\Users\kdahlqui\AppData\Roaming\npm\node_modules\parallelshell\index.js:104:17 at Array.forEach () at Object. (C:\Users\kdahlqui\AppData\Roaming\npm\node_modules\parallelshell\index.js:100:6) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12) { code: 'ERR_INVALID_ARG_TYPE'

Doing the above might cause the following: Error: Cannot find module 'C:\Users\kdahlqui\Desktop\GRNsight\node_modules\parallelshell\index.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15) at Module._load (node:internal/modules/cjs/loader:922:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: []

This error could be fixed by deleting node-options from inside the GRNsight folder. Then call and npm run start-dev should work

dondi commented 12 months ago

Final edits are made and we are good to move on 🤗