Skip to content

AmrMualla/RITSimulationofProteinSeparations

Repository files navigation

JBioFramework Web Application

The JBioFramework Web Application is a more efficient method of performing 1-Dimensional through the use of a browser and file selection in the format of FASTA files. This document will contain information regarding Download and Installation, Usage for Development, and Testing Usage for the application.

Project Sponsor

PaulPhoto.jpg

Dr. Paul Craig received his B.S. in Chemistry from Oral Roberts University in 1979, and his Ph.D. in Biological Chemistry from The University of Michigan in 1985. Following a post-doc at Henry Ford Hospital (biophysical chemistry of blood clotting; 1985-1988), he spent five years as an analytical biochemistry at BioQuant, Inc., in Ann Arbor, Michigan before joining RIT in 1993.

Download and Installation:

Git

git clone https://github.com/AmrMualla/RITSimulationofProteinSimulations.git

Windows:

cd RITSimulationofProteinSimulations\
py -m pip install -r requirements.txt

macOS or Linux:

cd RITSimulationofProteinSimulations/
pip install -r requirements.txt

Software Requirements

  • Python 3.7 or higher
  • Node.js 20.11.0 or higher
  • React 18.2.0 or higher

Usage for Development

Navigate to the top level directory by typing in the command line

Windows:

cd RITSimulationofProteinSimulations\

macOS or Linux:

cd RITSimulationofProteinSimulations/

Launch the API server by typing in the command line:

uvicorn server:app --reload

Navigate to the jbio-web-app subdirectory by typing in the command line

Windows:

cd frontend\jbio-web-app\

macOS or Linux:

cd frontend/jbio-web-app/

Launch the application by typing in the command line:

npm start

A browser will open with the URL: http://localhost:3000/

BrowserImage.png

Press the 1D Electrophoresis button on the left.

Follow the instructions listed beneath the simulation to load the desired FASTA files and begin the simulation:

1DEInstructions.png

Testing Usage

Frontend Guide:

Author: Chase Amador

Introduction

This guide will be going over the basics of the Jest tests created in this project, including how to install Jest, create a basic Jest class, and the standards followed creating the existing Jest tests. Jest was a great choice for the team because of the choice to use Node.js and React. Jest synergizes very well with both of these and makes it easy to use.

Installation

Installation for Jest is simple with the help of a package manager. Since we are using Node.js with npm as the package manager, installation is as easy as pasting:

npm install --save-dev jest

once you navigate to

Windows:

..\RITSimulationofProteinSimulations\frontend\jbio-web-app

macOS or Linux:

~/RITSimulationofProteinSimulations/frontend/jbio-web-app

To do so, open the terminal, which is usually found under the View tab in most IDEs, and select the Terminal button. It will open up the terminal in the default directory. Then navigate to the desired directory by typing

Windows:

cd frontend\jbio-web-app

macOS or Linux:

cd frontend/jbio-web-app

This should put you in the correct directory, so typing

npm install --save-dev jest

in the terminal will install Jest for you and have everything ready to go.

Running the Tests

Once the installation is complete, typing

npm test

will bring up the watch usage buttons which you can use to run the tests. If there is every an error saying:

npm test is not recognized

type:

npm install

again to update the package. Then you should see this:

FrontendTestingImage1.png

awill run all the test suites.

f will run all the failed tests.

p will let you chose a test suite to test by typing its name.

t will let you chose a specific test to test by typing its name.

q will end the session.

After running a test, it will tell you how many test suites and tests have passed and if they failed, where and why they did. Heres an example output:

FrontendTestingImage2.png

Jest Test Basics

If on Windows, the Jest tests are stored in

.\\RITSimulationofProteinSimulations\frontend\jbio-web-app\src\components\__tests__

If on macOS or Linux, the Jest tests are stored in

~/RITSimulationofProteinSimulations/frontend/jbio-web-app/src/components/__tests__

Currently, there is a test class for each frontend component in the project. They all vary depending on the component but all have a similar format that should be used when creating more tests. For starters, these imports are needed for jest tests:

FrontendTestingImage3.png

These are pretty standard imports, the first line doesn’t change, it imports React which is what is used for the web app. The second line is the same format, but you will add in methods you use in your tests. Some examples would be

render, fireEvent, screen, and various others. Adding more methods would look like this:

FrontendTestingImage4.png

Now for creating tests, the default test will look like this:

FrontEndTestingImage5.png

You can replace the 'Test name' with whatever you want to name the test. Ensure that it is detailed for ease of viewing which test is being run.

Backend Guide:

Author: Mack Leonard

Navigate to the top level directory by typing in the command line

Windows:

cd .\RITSimulationofProteinSimulations\
py -m unittest backend.Electro1DTests.ProteinTest

macOS or Linux:

cd ~/RITSimulationofProteinSimulations/
python3 -m unittest backend.Electro1DTests.ProteinTest

OR

Some IDEs have a built-in run function for files that can be executed. If you wish to do this, navigate to the ProteinTest.py or any other test file and click the run button.


Analyze results from the tests being run and modify the test or method being tested if failed.

API Guide:

  • TODO

Project Team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published