跳转到主要内容

细胞迁移追踪数据的数据包表示

项目描述

https://travis-ci.org/CellMigStandOrg/biotracks.svg?branch=master https://badge.fury.io/py/biotracks.svg

Biotracks为细胞迁移追踪文件提供了一种标准格式,并提供了一系列从流行的追踪软件包到biotracks格式的转换器,biotracks是无摩擦表格数据包的一种特殊化。

从源安装(仅限Python 3)

python setup.py install

从PiPy安装

pip install biotracks

使用方法

转到scripts目录并运行

python create_dpkg.py your_tracking_file

这将创建一个包含以下内容的表格数据包目录

  • 对象(例如,细胞)创建的csv文件

  • 链接(对象的线性集合)创建的csv文件

  • 数据包的json描述文件

后者将看起来像这样

{
    "name": "cmso_tracks",
    "resources": [
        {
            "name": "cmso_objects_table",
            "path": "objects.csv",
            "schema": {
                "fields": [
                    {
                        "constraints": {
                            "unique": true
                        },
                        "description": "",
                        "format": "default",
                        "name": "cmso_object_id",
                        "title": "",
                        "type": "integer"
                    },
                    {
                        "description": "",
                        "format": "default",
                        "name": "cmso_frame_id",
                        "title": "",
                        "type": "integer"
                    },
                    {
                        "description": "",
                        "format": "default",
                        "name": "cmso_x_coord",
                        "title": "",
                        "type": "number"
                    },
                    {
                        "description": "",
                        "format": "default",
                        "name": "cmso_y_coord",
                        "title": "",
                        "type": "number"
                    }
                ],
                "primaryKey": "cmso_object_id"
            }
        },
        {
            "name": "cmso_links_table",
            "path": "links.csv",
            "schema": {
                "fields": [
                    {
                        "description": "",
                        "format": "default",
                        "name": "cmso_link_id",
                        "title": "",
                        "type": "integer"
                    },
                    {
                        "description": "",
                        "format": "default",
                        "name": "cmso_object_id",
                        "title": "",
                        "type": "integer"
                    }
                ],
                "foreignKeys": [
                    {
                        "fields": "cmso_object_id",
                        "reference": {
                            "datapackage": "",
                            "fields": "cmso_object_id",
                            "resource": "cmso_objects_table"
                        }
                    }
                ]
            }
        }
    ]
}

配置

某些格式需要配置文件,该文件指定了如何映射对象ID、坐标名称等。此文件必须是INI格式,包含两个部分

  • TOP_LEVEL_INFO:指定数据包的名称以及额外的(可选)信息

  • TRACKING_DATA: 指定如何将源格式中的信息映射到biotracks列标题

您可以通过传递参数到create_dpkg.py脚本的-c选项来提供配置文件;如果未设置此选项,脚本将在跟踪文件相同的目录中查找biotracks.ini文件;如果没有找到,脚本将使用默认名称为整体包和列标题。

示例

[TOP_LEVEL_INFO]
author = the author of the dp
title = a title describing the dp
name = a name for the dp
author_institute = the insitute of the author
author_email = a valid email address

[TRACKING_DATA]
cmso_x_coord = the column name pointing to the x coordinate
cmso_y_coord = the column name pointing to the y coordinate
cmso_z_coord = the column name pointing to the z coordinate
cmso_frame_id = the column name pointing to the frame information
cmso_object_id = the object identifier
cmso_link_id = the link identifier


Examples
--------

`CELLMIA <https://github.com/CellMigStandOrg/biotracks/tree/master/examples/CELLMIA>`_ .
`CellProfiler <https://github.com/CellMigStandOrg/biotracks/tree/master/examples/CellProfiler>`_ .
`ICY <https://github.com/CellMigStandOrg/biotracks/tree/master/examples/ICY>`_ .
`Mosaic <https://github.com/CellMigStandOrg/biotracks/tree/master/examples/Mosaic>`_ .
`TrackMate <https://github.com/CellMigStandOrg/biotracks/tree/master/examples/TrackMate>`_ .

由以下支持