Skip to content

sirine-b/cell-image-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cell Image Database

Cell Image Database

The Cell Image Database is a comprehensive web application designed to streamline the management, storage, and analysis of cellular images. This platform addresses challenges faced by cellular biology researchers, such as the absence of centralized tools for storing and analyzing cell images, which often leads to inefficiencies in accessing, organizing, and cross-referencing data.

By centralizing image storage and automating cell counting, the application reduces manual errors and saves time, enabling researchers to focus on analyzing findings rather than repetitive tasks. Additionally, the platform enhances collaboration by providing seamless sharing and retrieval of data.

Installation Instructions

Install Node.js and PostgreSQL

  1. Install Node from Node Download and add the path to Node.js to your system environment variables.
  2. Download and install PostgreSQL from PostgreSQL Official Website. Remember your Username and Password when setting up PostgreSQL as it will be required later.

Step 1: Clone the Repository

  1. Clone the repository from GitHub:
    git clone https://github.com/sirine-b/cell-image-database.git
  2. Navigate to the cloned repository:
    cd cell-image-database

Step 2: Frontend Setup

  1. Navigate to the frontend directory:
    cd frontend
  2. Install the required dependencies:
    npm install axios react-router-dom redux react-redux

Step 3: Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install the required dependencies:

    npm install express cors dotenv
  3. Install the child process module for Node.js:

    npm install child_process
  4. Make sure you have PostgreSQL installed. Check by verifying the PostgreSQL version:

    psql --version

    If PostgreSQL is not installed, download and install it from PostgreSQL Official Website.

  5. Install PostgreSQL adapter for Python:

    pip install psycopg2

Step 4: Cellpose Installation

You can install Cellpose using native Python if you have Python 3.8+.

  1. Create a Python virtual environment for Cellpose in backend:
    python3 -m venv cellpose
  2. Activate the virtual environment:
    • macOS/Linux:
      source cellpose/bin/activate
    • Windows:
      cellpose\Scripts\activate
  3. Install Cellpose and its GUI:
    python -m pip install cellpose
    python -m pip install 'cellpose[gui]'  # Remove apostrophe if an error occurs
  4. Test Cellpose by running:
    python -m cellpose

If you have problems installing or running Cellpose, please visit Cellpose GitHub.

Step 5: Run the Application

Step 1: Connect the PostgreSQL Database:

  • Start IntelliJ, find database (cell_image_db), right click to find properties.
  • Fill in the login credentials (username and password), then test connection. If successful, proceed, if not, update any data driver files required.
  • Paste the following into the PostgreSQL console in IntelliJ to create the tables:
    CREATE DATABASE cell_image_db;
    
    \c cell_image_db
    
    CREATE TABLE users (
        id SERIAL PRIMARY KEY,
        username VARCHAR(50) UNIQUE NOT NULL,
        password VARCHAR(100) NOT NULL
    );
    
    CREATE TABLE images (
        id SERIAL PRIMARY KEY,
        filepath VARCHAR(255) NOT NULL,
        Category VARCHAR(255) NOT NULL,
        Species VARCHAR(255) NOT NULL,
        Cellular_Component VARCHAR(255) NOT NULL,
        Biological_Process VARCHAR(255) NOT NULL,
        Shape VARCHAR(255) NOT NULL,
        Imaging_Modality VARCHAR(255) NOT NULL,
        Description VARCHAR(255) NOT NULL,
        DOI VARCHAR(255) NOT NULL,
        Number_Cells INT
    );
    
    CREATE TABLE favorites (
        id SERIAL PRIMARY KEY,
        user_id INTEGER REFERENCES users(id),
        image_id INTEGER REFERENCES images(id),
        UNIQUE(user_id, image_id)
    );
  • Run the database console code.

Step 2: Adjust the Login and Password for the database:

  • Modify the database connection settings with your PostgreSQL credentials in server.js and count_cells.py :
    const pool = new Pool({
      user: 'your-username',
      host: 'localhost',
      database: 'your-database-name',
      password: 'your-password',
      port: 5432,
    });

Step 3: Run the Server:

  • From IntelliJ, run server.js

Step 4: Start the Frontend:

  • Navigate to the frontend directory:

    cd frontend
  • Start the React application:

    npm start
  • The application should now be running.

    Click on the image below to watch a demo of the app running! Video Title

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •