Crates.io | vtracker |
lib.rs | vtracker |
version | 1.0.0 |
source | src |
created_at | 2023-05-15 05:18:55.491663 |
updated_at | 2023-05-15 05:18:55.491663 |
description | For tracking the relationship between group membership changes across versions. |
homepage | |
repository | https://github.com/aaronmussig/VTracker |
max_upload_size | |
id | 864742 |
size | 159,361 |
For tracking the relationship between group membership changes across versions.
pip install vtracker
VTracker
class and specify the versions from oldest to newest.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()