为cgp-dss数据加载器准备各种数据源的两栖新型数据转换器
newt-transformer的Python项目详细描述
牛顿变压器
从gen3转换为可读内容的元数据转换器 CGP DSS数据加载器
通用设置
(可选)建议使用python 3 virtual environment。
运行:
pip3 install newt-transformer
开发准备
克隆回购协议:
git clone https://github.com/jessebrennan/newt-transformer.git
转到克隆项目的根目录:
cd newt-transformer
运行(最好在新的virtual environment中):
make develop
运行测试
确保遵循了“设置”进行开发
运行:
make test
转换牧羊犬出口商的数据
第一步是使用 sheepdog exporter。提取的顶级公共数据 可从牧羊犬获得on the release page 在资产项下假设您使用这些数据,您现在将拥有一个名为
topmed-public.json
的文件确保正在运行在set up说明中设置的虚拟环境。
现在我们需要转换数据。从项目运行的根目录:
newt new /path/to/topmed-public.json --output-json transformed-topmed-public.json
这将生成名为
transformed-topmed-public.json
的转换输出文件。参数
new
指定我们需要变压器输出格式的最新版本。 它可以替换为gen3
参数,但是这种旧格式很快就会被弃用您可能希望将此数据上载到DSS。有关说明,请访问 the DSS data loader repo。