Skip to content

Commit 9e68a7e

Browse files
committed
Add install instruction steps and check for vg at configurable places
1 parent c2f5038 commit 9e68a7e

File tree

6 files changed

+193
-61
lines changed

6 files changed

+193
-61
lines changed

README.md

+71-30
Original file line numberDiff line numberDiff line change
@@ -18,50 +18,91 @@ The easiest way to have a look at some graph visualizations is to check out the
1818

1919
If you are using vg and want visualize the graphs it generates, the online version is limited to small file sizes. For visualizing bigger data sets you can run the Sequence Tube Map on your own. You can either run the Tube Map completely on your local machine or use your local browser to access a Tube Map server running on any other machine you have access to.
2020

21-
### Prerequisites
21+
### Install Prerequisites
2222

23-
* The NodeJS version [specified in the `.nvmrc` file](https://github.com/vgteam/sequenceTubeMap/blob/master/.nvmrc), which as of this writing is **18.7.0**. Other several other NodeJS versions will work, or at least mostly work, but only this version is tested. This version of NodeJS can be installed on most systems with [nvm](https://github.com/nvm-sh/nvm).
23+
The Sequence Tube Map needs NodeJS, NPM, and [vg](https://github.com/vgteam/vg).
24+
25+
1. The simplest
26+
27+
28+
29+
* The NodeJS version [specified in the `.nvmrc` file](https://github.com/vgteam/sequenceTubeMap/blob/master/.nvmrc), which as of this writing is **18.7.0**. Several other NodeJS versions will work, or at least mostly work, but only this version is tested. This version of NodeJS can be installed on most systems with [nvm](https://github.com/nvm-sh/nvm).
2430
* NPM. NPM comes included in most NodeJS installations. Ubuntu packages it as a separate `npm` package.
2531
* [vg](https://github.com/vgteam/vg) (vg can be tricky to compile. If you run into problems, there are docker images for vg at [https://github.com/vgteam/vg_docker](https://github.com/vgteam/vg_docker).)
2632

2733
The directory containing the vg executable needs to be added to your environment path:
2834

2935
```
30-
PATH=/<your_path_to_folder_with_vg>:$PATH
36+
PATH=/<your_path_to_directory_with_vg>:$PATH
3137
```
3238

3339
### Installation
3440

35-
- Clone the repo:
36-
```
37-
git clone https://github.com/vgteam/sequenceTubeMap.git
38-
```
39-
- Switch to the `sequenceTubeMap` folder:
40-
```
41-
cd sequenceTubeMap
42-
```
43-
- Install npm dependencies:
44-
```
45-
npm install
46-
```
47-
- Build the frontend:
48-
```
49-
npm run build
50-
```
41+
1. Open your terminal. On Mac, hit `Command` + `Space`, type `terminal.app`, and hit `Enter`. On Linux, you can usually hit `Ctrl` + `Alt` + `T`.
42+
2. If you don't already have Git installed, [install Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
43+
3. Clone the Git repository by typing:
44+
```
45+
git clone https://github.com/vgteam/sequenceTubeMap.git
46+
```
47+
Then press `Enter`.
48+
4. Switch to the `sequenceTubeMap` directory:
49+
```
50+
cd sequenceTubeMap
51+
```
52+
5. If you don't already have the right version of NodeJS, install [nvm](https://github.com/nvm-sh/nvm) which can install NodeJS:
53+
```
54+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
55+
```
56+
6. After installing `nvm`, load it into your current terminal session by running:
57+
```
58+
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
59+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
60+
```
61+
Alternately, you can close and re-opne your terminal, and navigate back to the `sequenceTubeMap` directory.
62+
7. Install the version of NodeJS that the Sequence Tube Map [asks for in its `.nvmrc` file](https://github.com/vgteam/sequenceTubeMap/blob/master/.nvmrc). As of this writing that is **18.7.0**. You can install the right version automatically with `nvm`:
63+
```
64+
nvm install
65+
```
66+
8. Activate the appropriate version of NodeJS:
67+
```
68+
nvm use
69+
```
70+
9. Install the excact versions of NPM dependencies thast the Sequence Tube Map is tested against:
71+
```
72+
npm ci
73+
```
74+
Note that this is using **npm**, not **nvm** as in the previous step.
75+
10. Build the frontend:
76+
```
77+
npm run build
78+
```
5179
5280
### Execution
5381
54-
- Start the node server:
55-
```
56-
npm run serve
57-
```
58-
- If the node server is running on your local machine, open a browser tab and go to `localhost:3001`.
59-
- If the node server is running on a different machine, open a local browser tab and go to the server's URL on port 3001 `http://<your server's IP or URL>:3001/`.
60-
If you cannot access the server's port 3001 from the browser, instead of configuring firewall rules etc., it's probably easiest to set up an SSH tunnel.
61-
62-
```
63-
ssh -N -L 3001:localhost:3001 <your username>@<your server>
64-
```
82+
After installation, you can run the tube map by:
83+
84+
1. Open your terminal. On Mac, hit `Command` + `Space`, type `terminal.app`, and hit `Enter`. On Linux, you can usually hit `Ctrl` + `Alt` + `T`.
85+
2. Switch to the `sequenceTubeMap` directory:
86+
```
87+
cd sequenceTubeMap
88+
```
89+
If you didn't clone the Git repository immediately inside your home directory, you may need to navigate to another directory first.
90+
3. Activate the appropriate version of NodeJS. If you installed `nvm` to manage NodeJS versions, you can run:
91+
```
92+
nvm use
93+
```
94+
4. Start the Sequence Tube Map server:
95+
```
96+
npm run serve
97+
```
98+
Note that this is using **npm**, not **nvm** as in the previous step.
99+
5. Open the Sequence Tube Map in your browser.
100+
- If you are running the Sequence Tube Map on your local computer, you can visit [http://[::]:3001](http://[::]:3001) or [http://localhost:3001](http://localhost:3001).
101+
- If you are running the Sequence Tube Map on a *different* computer (for example, one accessed by SSH), you will need to connect to it there. You can try browsing to port 3001 on that machine's hostname. For example, if you connected with `ssh [email protected]`, then `bigserver.example.edu` is the hostname, and you want to visit `http://bigserver.example.edu:3001`. If that doesn't work, you can try setting up an SSH tunnel by making a second SSH connection with:
102+
```
103+
ssh -L 3001:localhost:3001 [email protected]
104+
```
105+
While that SSH connection is open, you will be able to see the Sequence Tube Map at [http://localhost:3001](http://localhost:3001).
65106
66107
### Setting Up a Visualization
67108

docker/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"dataType": "built-in"
4848
}
4949
],
50-
"vgPath": "",
50+
"vgPath": [""],
5151
"dataPath": "/data",
5252
"internalDataPath": "exampleData/internal/",
5353
"tempDirPath": "temp",

package-lock.json

+50-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"webpack": "^5.82.0",
5959
"webpack-dev-server": "4.11.1",
6060
"websocket": "^1.0.34",
61+
"which": "^4.0.0",
6162
"worker-rpc": "^0.2.0"
6263
},
6364
"scripts": {

src/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"dataType": "built-in"
7878
}
7979
],
80-
"vgPath": "",
80+
"vgPath": ["./", ""],
8181
"dataPath": "exampleData",
8282
"internalDataPath": "exampleData/internal/",
8383
"tempDirPath": "temp",

0 commit comments

Comments
 (0)