Skip to content

gsergeant/biotracks

This branch is 48 commits behind CellMigStandOrg/biotracks:master.

Folders and files

NameName
Last commit message
Last commit date
Aug 3, 2017
Aug 3, 2017
Jul 18, 2017
Jul 20, 2017
Jun 26, 2017
Jun 27, 2017
Jul 8, 2017
May 24, 2017
Apr 24, 2017
Jan 28, 2017
Jul 6, 2017
Jul 20, 2017
May 24, 2017
Aug 29, 2017
May 24, 2017

Repository files navigation

Biotracks: a standard format for cell migration-derived tracking files

https://travis-ci.org/CellMigStandOrg/biotracks.svg?branch=master

Biotracks provides a standard format for cell migration tracking files and a series of converters to this format from popular tracking sofware packages. The biotracks format is a specialization of the Frictionless Tabular Data Package .

Installation (Python 3 only)

python setup.py install

Usage

Move to the scripts directory and run:

python create_dpkg.py your_tracking_file

This will create a tabular data package directory containing:

  • a csv file for the objects (e.g., cells)
  • a csv file for the links (linear collections of objects)
  • the json descriptor file for the data package

The latter will look like this:

{
    "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"
                        }
                    }
                ]
            }
        }
    ]
}

The script also creates plots of trajectories and turning angles.

Configuration

Some formats require a configuration file that specifies how to map object IDs, coordinate names, etc. This file must be in the INI format with two sections:

  • TOP_LEVEL_INFO: specifies a name for the data package and additional (optional) information
  • TRACKING_DATA: specifies how to map information from the source format to the biotracks column headers

You can provide a configuration file by passing it via the -c option to create_dpkg.py; if this option is not set, the script will look for a biotracks.ini file in the same directory as your tracking file; if this is not found, the script will use default names for both the overall package and the column headers.

Example:

[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

About

A repository for data package representation for cell tracking data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Makefile 0.1%