CryoBase is a graphical application to store and manage cryo-EM data using Amazon Web Services (AWS) Simple Storage Solution (S3). The goal is to provide a convenient way to store cryo-EM data using low-cost cloud storage. The application has an interface for entering metadata for a cryo-EM dataset and uploading the dataset to S3. It supports the S3 STANDARD
storage class, and the DEEP_ARCHIVE
storage class which is priced at about $1/TB/month. There is also an interface for browsing and downloading datasets stored on S3. CryoBase is designed to interact with the user's own AWS account so the user has complete control over the data even without CryoBase.
The project is configured to create builds for macOS and Linux. Build instructions are below.
CryoBase is made with the React and Electron frameworks. The UI was made with AntD.
⛔ I'm no longer maintaining this project but if you have questions feel free to post them and I will do my best to respond.
NOTE: Before using AWS S3 or CryoBase please familiarize yourself with the data storage and retrieval costs of AWS S3 (link).
- Go to the AWS Management Console website and click
Create an AWS Account
. - After creating the account, click on your username in the top menu bar of the AWS Management Console website and select
My Security Credentials
. - Under the
Access keys (access key ID and secret access key)
section, clickCreate New Access Key
. This generates anAWS Access Key
andAWS Secret Key
. You will use these keys later to configure CryoBase.
- Within the AWS Management Console page navigate to the S3 section (found under the Storage service category).
- Here you will create a bucket, which is conceptually like a directory to store your data. Click
Create bucket
. Enter a bucket name (for example, cryo-em-data). Select the nearest AWS Region from the dropdown menu. Customize the bucket settings as desired and clickCreate bucket
at the bottom of the page.
- Open CryoBase and click
Settings
(the gear icon). Enter the bucket name, AWS Access Key, and AWS Secret Key. - CryoBase will notify you if your AWS configuration details are valid. If you have already uploaded data to the target bucket using CryoBase then the
Data Archive
section will automatically populate to show the available datasets.
- Click
Upload Data
(the cloud icon). Enter the details for the cryo-EM dataset to be uploaded. - Select the desired storage class (
STANDARD
orDEEP_ARCHIVE
). The details and costs of these classes is provided on the AWS S3 website. EssentiallySTANDARD
is higher cost but can be downloaded on-demand, whileDEEP_ARCHIVE
is low-cost but requires a 12-48 hour retrieval step before data can be downloaded. - Click
Start Upload
. While the upload is in progress you can freely switch to theData Archive
section to see the new dataset entry in the table.
Data stored in the STANDARD
storage class:
- Click
Data Archive
and select a dataset from the table. - Choose a local download path.
- Click
Start Download
.
Data stored in the DEEP_ARCHIVE
storage class:
- Click
Data Archive
and select a dataset from the table. - There are different
Data Status
categories relevant to interacting with data stored in theDEEP_ARCHIVE
storage class.
Archived
means a data retrieval process must be initiated to make it available for download. Click theArchived
button and wait until a notification confirms the data is being restored. Depending on the number of files in the dataset it may take a few minutes for this process to complete and the notification to display.Restoring
means that AWS has marked the data to be restored. Clicking theRestoring
button will check the status of the restoration process. Once the data is restored, clicking this button will confirm the restored status of the data and the button will change toRestored
.Restored
means the data has been retrieved and is available for download. After selecting the table row, choose a local download path and clickStart Download
. Clicking theRestored
button will display a notification with the estimate for when the data will return toArchived
status (3 days from the time data retrieval completed).Archiving
means the recovered data has partially expired and is being returned toArchived
status. Once the data has completely returned toArchived
status it will again be available for retrieval.
As a precaution CryoBase was designed without an interface for deleting data. However, data can easily be deleted from the AWS S3 web console.
- Navigate to the S3 section of the AWS console.
- Locate the bucket used by CryoBase (e.g. cryo-em-data). Within this bucket select the dataset you want to delete, and click
Delete
. AWS will go through a quick confirmation step to verify you actually want to delete the data. - In addition, you should delete the associated metadata for the target dataset. This will ensure that CryoBase no longer displays the dataset as an entry in the Archive table. The metadata can be found in your bucket within the metadata path (e.g. cryo-em-data/metadata). Select the metadata for the target dataset and click
Delete
.
Download the git repo and install the dependencies.
yarn
or npm install
Start the React web server.
yarn start
or npm start
In a separate shell start Electron.
yarn electron-start
or npm run electron-start
Build the package.
yarn electron-pack
or npm run electron-pack
Electron Builder prefers to have the main JS file named as electron.js
so should not use main.js
.
Electron Builder only does minification for files in /src
and thus will not minify electron.js
or preload.js
which reside in /public
. As a workaround the prebuild.sh
script is run before the app is packaged, and the postbuild.sh
script is run after packaging. This script requires the yarn dist
and yarn dist
directories which are in the main project folder. Both scripts are automatically run when running yarn electron-pack
or npm run electron-pack
.
This repository was helpful for getting Electron Builder to properly package the app: https://github.com/rgfindl/electron-cra-boilerplate
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
You can run yarn pack (only generates the package directory without really packaging it. This is useful for testing purposes).
You can run yarn dist (to package in a distributable format (e.g. dmg, windows installer, deb package))