Data package representation for cell migration tracking data
Project description
This Python project aims to create a simple Python package to produce data packages of cell migration tracking files. The final goal is to have a uniform, standardized way to represent these data, as in Frictionless Data and Data Packages .
Steps to follow to use the package:
step 1 - Install the package (note it’s Python 3 only at the moment):
python setup.py install
step 2 - create a biotracks.ini configuration file and place it in the same directory as your tracking file. The file must be structured as follows:
[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]
x_coord_cmso = the column name pointing to the x coordinate
y_coord_cmso = the column name pointing to the y coordinate
z_coord_cmso = the column name pointing to the z coordinate
frame_cmso = the column name pointing to the frame information
object_id_cmso = the object identifier
link_id_cmso = the link identifier
step 3 - move to the scripts directory and run:
python create_dpkg.py your_tracking_file
this will create a dp directory containing:
a csv file for the objects (i.e. cells)
a csv file for the links (i.e. a linear collection of objects)
and a dp.json file containing the json schemas of the two csv files.
This last file will look something like this:
{
"resources": [{
"name": "objects_table",
"schema": {
"primaryKey": "SPOT_ID",
"fields": [{
"name": "SPOT_ID",
"title": "",
"description": "",
"constraints": {
"unique": true
},
"type": "integer",
"format": "default"
}, {
"type": "integer",
"name": "FRAME",
"title": "",
"format": "default",
"description": ""
}, {
"type": "number",
"name": "POSITION_X",
"title": "",
"format": "default",
"description": ""
}, {
"type": "number",
"name": "POSITION_Y",
"title": "",
"format": "default",
"description": ""
}]
},
"path": "objects.csv"
}, {
"name": "links_table",
"schema": {
"foreignKeys": [{
"fields": "SPOT_ID",
"reference": {
"resource": "objects_table",
"fields": "SPOT_ID",
"datapackage": ""
}
}],
"fields": [{
"type": "integer",
"name": "LINK_ID",
"title": "",
"format": "default",
"description": ""
}, {
"type": "integer",
"name": "SPOT_ID",
"title": "",
"format": "default",
"description": ""
}]
},
"path": "links.csv"
}],
"name": "CMSO_tracks",
"title": "A CMSO data package representation of cell tracking data",
"author_email": "paola.masuzzo@email.com",
"author_institute": "VIB",
"author": "paola masuzzo"
}
Then, the datapackage is pushed to a pandas dataframe. At the moment, this dataframe is used to create simple visualizations of links and turning angles.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file biotracks-0.2.0.tar.gz
.
File metadata
- Download URL: biotracks-0.2.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72620310c2a61d3b39752ac70103efcfe530a9b409bb1b6e8f9c420d2ac9da03 |
|
MD5 | be380ae68a4b0e7e259e9ac17dbfa9ed |
|
BLAKE2b-256 | da8938ef7f79d96f4c1fddf23fb0675bd7d47da81149051e61afe98d2fa71f32 |