在文件夹树中建立文件缓存以提高效率和紧急情况
biop的Python项目详细描述
biop json格式可用于共享文本文档和注释。
biop公开标准库marshal和pickle模块的用户熟悉的api。
在github上开发biop:https://github.com/yfpeng/pengyifan-biop
开始
正在安装biop(使用conda
)
$ git clone https://github.com/yfpeng/pengyifan-biop.git $ cd pengyifan-biop $ conda env create -f environment2.7.yml $ source activate biop $ python setup.py
编码bioc集合对象collection:
importbioj# Serialize ``PDocument`` to a BioP formatted ``str``.bioc.dumps(document)# Serialize ``PDocument`` as a BioP formatted stream to ``fp``.withopen(filename,'w')asfpbioc.dump(document,fp)
解码biop json文件:
importbiop# Deserialize ``fp`` to a BioP document object.withopen(filename,'r')asfp:biop.load(fp)
验证
要验证数据集格式,请运行
jsonschema -i tests/foo.json biop_schema.json
贡献
请阅读CONTRIBUTING了解有关我们的行为准则以及向我们提交请求的过程的详细信息。
开发人员
- 彭一帆(yifan.peng@nih.gov)