Minerva命令行界面
minerva-cli的Python项目详细描述
密涅瓦CLI
简介
Minerva命令行界面允许上传和导入显微镜图像到Minerva Cloud。图像也可以从Minerva Cloud导出,并以OME-TIFF格式保存到本地磁盘。在
配置
默认情况下,Minerva将在用户的主目录中查找名为.Minerva的文件并从该文件加载配置。Minerva需要配置才能连接到正确的Minerva服务。在
命令行中给定的参数将覆盖配置文件中设置的值。[Config-location可被参数-Config覆盖]
{setup{miner命令可以通过cdva}运行 然后,Minerva CLI将提示您输入以下信息:
Parameter name | Description |
---|---|
MINERVA_REGION | us-east-1 (aws region where Minerva is installed) |
MINERVA_USERNAME | Minerva Username (can be left empty) |
MINERVA_PASSWORD | Minerva Password (can be left empty) |
MINERVA_ENDPOINT | API Gateway stage URL, e.g. https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev |
MINERVA_CLIENT_ID | Cognito App client id for the user pool |
还提供了一个配置文件示例,以便于编辑该文件。收到。密涅瓦。例子设置为$HOME/.minerva,并使用文本编辑器打开文件以编辑值。所有参数值也可以用环境变量设置。在
显示帮助
python minerva.py
将图像目录导入Minerva Cloud
将REPOSITORY_NAME替换为REPOSITORY名称,将PATH_TO_DIRECTORY替换为目录路径。 将导入目录及其子目录中的所有图像。在
^{pr2}$导入单个文件。在
python minerva.py import -r REPOSITORY_NAME -f PATH_TO_FILE```
导入OME TIFF时,参数--local将在本地处理图像,通常只使用一个或几个图像可以加快导入速度。在
python minerva.py import -r REPOSITORY_NAME -f PATH_TO_FILE --local```
将OME-TIFF从Minerva Cloud导出到本地磁盘
以下命令将按默认名称导出和保存图像,并且仅保存 最高金字塔级别。在
python minerva.py export --id IMAGE_UUID
靠氧气运转
安装
# Log in O2 with SSH# Clone the minerva-cli repository git clone https://github.com/labsyspharm/minerva-cli.git # Load necessary modules (you may need to restart bash shell after running this the first time) module load conda2 # Create conda environment conda create --name minerva python=3.6 conda activate minerva pip install -r requirements.txt # Configure minerva.config cp .minerva.example ~/.minerva # Edit the values in config file nano minerva.config # It's a good idea to prevent other users from reading your configuration file chmod 700 ~/.minerva
将图像从ImStor导入Minerva Cloud
# Log in O2 transfer node with SSH (replace ecommonsid with your eCommons user id) ssh ecommonsid@transfer.rc.hms.harvard.edu # Copy images from ImStor to scratch space, e.g. mkdir -p /n/scratch3/$USER/dataset cp /n/files/ImStor/.../image.ome.tif /n/scratch3/$USER/dataset # Log in O2 with SSH ssh ecommons@o2.hms.harvard.edu # Start interactive O2 session srun --pty -p interactive --mem 500M -t 0-06:00 /bin/bash # Activate conda environment conda activate minerva # Run Minerva import# (replace [REPOSITORY] with a repository name)# All the images from the given directory will be imported python $HOME/minerva-cli/minerva.py import -r [REPOSITORY] -d /n/scratch3/$USER/dataset
- 项目
标签: