Skip to main content

For tracking the relationship between group membership changes across versions.

Project description

VTracker

PyPI PyPI - Python Version codecov.io

For tracking the relationship between group membership changes across versions.

Installation

  • PyPI: pip install vtracker

Usage

  1. Instantiate the VTracker class and specify the versions from oldest to newest.
  2. Populate the tracker with each unique entity, and specify the state of the entity at each of the versions. Missing versions have the state of 'Not Present'.

Consider the following example which generates the JSON required to display the following D3 Sankey diagram similar to that of the GTDB Taxon History tool:

from vtracker import VTracker

vt = VTracker(('R80', 'R83', 'R86.2', 'R89', 'NCBI'))
vt.add('G000210735', {'R80': 's__Faecalibacterium prausnitzii_B',
                      'R83': 's__Faecalibacterium prausnitzii_B',
                      'R86.2': 's__Faecalibacterium prausnitzii_B',
                      'R89': 's__Faecalibacterium prausnitzii_G',
                      'NCBI': 's__Faecalibacterium prausnitzii'})

vt.add('G003287485', {'R89': 's__Faecalibacterium prausnitzii_G',
                      'NCBI': 's__Faecalibacterium prausnitzii'})

vt.add('G003287505', {'R89': 's__Faecalibacterium prausnitzii_G',
                      'NCBI': 's__Faecalibacterium prausnitzii'})

vt.add('G003293635', {'R89': 's__Faecalibacterium prausnitzii_G',
                      'NCBI': 's__Faecalibacterium prausnitzii'})

vt.add('G003508795', {'R80': 's__Faecalibacterium prausnitzii_B',
                      'R83': 's__Faecalibacterium prausnitzii_B',
                      'R86.2': 's__Faecalibacterium prausnitzii_B',
                      'R89': 's__Faecalibacterium prausnitzii_G'})

sankey_json = vt.as_sankey_json()

Sankey diagram example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for vtracker, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size vtracker-1.0.1-py2-none-any.whl (32.1 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size vtracker-1.0.1-py3-none-any.whl (32.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size vtracker-1.0.1.tar.gz (17.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page