-
Notifications
You must be signed in to change notification settings - Fork 6
Tutorial For Cytoscape Web
GAO Chengzhan edited this page Feb 13, 2024
·
13 revisions
For Linux
- Update your package repository:
- Run
sudo apt update
- Install Node.js and npm:
- Run
sudo apt install nodejs
AND - Run
sudo apt install npm
- Verify the installation:
- Run
node --version
(Must be >= 16.8.0) AND - Run
npm --version
For Mac
- Install Homebrew:
- Run
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Node.js and npm:
- Run
brew install node
- Verify the installation:
- Same as in the Linux case.
For Windows
- Download the Windows Installer:
- Visit the Node.js website and download the Windows Installer.
- Run the installer and follow the prompts to install Node.js and npm.
- Verify the installation:
- Same as in the Linux case(Run the commands in a command prompt or PowerShell).
For Linux
- Configure the Yarn repository:
- Run
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
AND - Run
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- Verify the installation:
- Run
yarn --version
(Must be >=1.22.11)
For Mac
- Install Yarn:
- Via Homebrew:
brew install yarn
OR - Via npm:
npm install --global yarn
- Verify the installation:
- Same as in the Linux case.
For Windows
- Install Yarn via npm
- Run
npm install --global yarn
- Verify the installation:
- Same as in the Linux case.
To get Cytoscape-web up and running locally, please follow these steps:
1. Prepare Your Workspace:
- Choose a directory where you want to store the Cytoscape-web codebase. Navigate to this directory in your terminal or command prompt.
2. Clone the Repository:
- Run the following command in the terminal:
git clone https://github.com/cytoscape/cytoscape-web
. - The above command creates a new folder named
cytoscape-web
containing the project files. Now you need to change into the newly cloned repository's directory by runningcd cytoscape-web
.
3. Install dependencies
- Install the project's dependencies using Yarn:
yarn install
.
4. Start the Development Server
- Once the dependencies are installed, you can start the development server with the command
yarn dev
.
5. Access the application
- Open your web browser and navigate to
localhost:5500
. This address connects to the development server running on your machine.
Cytoscape-Web is a single-page web application, with Backend using REST API and Frontend using React. The main work data flow is shown in the following diagram:
Workspace is the basic unit of userβs data, it represents the working status on a user's Cytoscape-Web. It includes:
- name: readable name of the Workspace
- id: unique ID of the Workspace
- metadata:
creationTime
,localModificationTime
- networkIds: list of network IDs
- current network: the network that is currently loaded in website
The network is a key object in Cytoscape-Web. It represents the topology of the graph, It includes:
- Network Summary:
- Visual Style
- Network Topology:
- View Model: the key-value pair storing what should be displayed in the actual visualizations.
- Tables: a 2-D array where each column represents an attribute and each row represents a node/edge
ββ πdata
ββ πempty-db.json # Empty database example
ββ πdocs
ββ πtesting.md
ββ πnetlify
ββ πredirects
ββ πnode_modules # Dependencies and libraries
ββ π...
ββ πsrc # Main Code Base
ββ π assets # Static icons, images, and color palettes are stored here
ββ π BrBG.png - A color palette
ββ π cytoscape.svg - The cytoscpae icon
ββ π config.json - Basic configurations of the website
ββ π...
ββ πcomponents # Website components are stored here
ββ π Login # User login panel
ββ π NetworkPanel # Network panel (upper-right side)
ββ π CyjsRenderer - Network Renderer
ββ π TableBrowser # The bottom table that contains information on nodes, edges, and networks
ββ π ToolBar # The top navigation bar
ββ π AnalysisMenu - Dropdown menu of 'Analysis'
ββ π DataMenu - Dropdown menu of 'Data'
ββ π Workspace # The upper-left-side workspace panel
ββ π...
ββ πfeatures # Website components are stored here
ββ π HierarchyViewer
ββ π LLMQuery
ββ πmodels # Models of data or UI components are stored here
ββ π Workspace
ββ π...
ββ πstore # Managing the state related to different objects
ββ π hooks
ββ π io
ββ π persist
ββ π NetworkStore.ts
ββ πutils
ββ π...
ββ π...
ββ πtest
ββ π...
ββ πunittest
ββ π...
ββ π.gitignore
ββ πREADME.md