向dtool添加http只读数据集支持
dtool-http的Python项目详细描述
- Github:https://github.com/jic-dtool/dtool-http
- 自由软件:麻省理工学院许可证
功能
- 通过使数据集可以通过http(s)访问来发布dtool数据集
- 通过http与dtool数据集交互
- 通过http复制数据集
安装
安装dtool http包。
cd dtool-http
python setup.py install
用法
要发布托管在amazon s3或microsoft azure存储中的数据集,请使用 dtool_publish_dataset命令行实用程序:
$ dtool_publish_dataset azure://jicinformatics/c58038a4-3a54-425e-9087-144d0733387f Dataset accessible at: https://jicinformatics.blob.core.windows.net/c58038a4-3a54-425e-9087-144d0733387f
显示已发布数据集的描述性元数据:
$ dtool readme show https://jicinformatics.blob.core.windows.net/c58038a4-3a54-425e-9087-144d0733387f --- description: Enterobacteria phage lambda, complete genome creation_date: 2018-02-06 accession: NC_001416.1 link: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1 reference: | Nucleotide [Internet]. Bethesda (MD): National Library of Medicine (US), National Center for Biotechnology Information; [1988] - . Accession No. NC_001416.1, Enterobacteria phage lambda, complete genome [cited 2018 Feb 06] Available from: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1
将数据集复制到本地磁盘:
$ dtool copy https://jicinformatics.blob.core.windows.net/c58038a4-3a54-425e-9087-144d0733387f ~/my_datasets Dataset copied to: file:///Users/olssont/my_datasets/lamda-phage-genome
通过http提供数据集目录
有一个简单的实用程序通过http为目录中的数据集提供服务,称为 dtool_serve_direcotry。这主要用于测试目的。
用法:
$ dtool_serve_directory ~/my_datasets
使用的默认端口是8081。在自述文件中显示描述性元数据 可以使用DTool:
$ dtool readme show http://localhost:8081/lamda-phage-genome --- description: Enterobacteria phage lambda, complete genome creation_date: 2018-02-06 accession: NC_001416.1 link: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1 reference: | Nucleotide [Internet]. Bethesda (MD): National Library of Medicine (US), National Center for Biotechnology Information; [1988] - . Accession No. NC_001416.1, Enterobacteria phage lambda, complete genome [cited 2018 Feb 06] Available from: https://www.ncbi.nlm.nih.gov/nuccore/NC_001416.1