Rockbox for the Samsung YP-S3
Porting Rockbox, the open-source music-player firmware, to a 2009 Samsung YP-S3 — deep in embedded software and assembly, despite a data-science background.
ARM assembly · embedded C · Python · DFU · Rockbox
Active

Italy · Portfolio
Machine Learning · Data Science · Engineering

Selected work & open source
Research implementations, teaching material and software experiments.
Porting Rockbox, the open-source music-player firmware, to a 2009 Samsung YP-S3 — deep in embedded software and assembly, despite a data-science background.
ARM assembly · embedded C · Python · DFU · Rockbox
Active
Open teaching material introducing modern R for statistical analysis, written for the Statistical Models MSc course at Politecnico di Torino.
R · statistics · Quarto
Open textbook
Java/ImageJ tool for automated cell-radius measurement in 3D confocal light-sheet microscopy images of mouse brain tissue.
Java · ImageJ · mcib3d-core
Bachelor thesis
Peer-reviewed work & preprints
Probabilistic modelling and algorithms for computational biology.
DiVA
Abstract Copy number alterations (CNAs) provide key information on tumor evolution and are now accessible at single-cell resolution through low-coverage DNA sequencing. Reconstructing accurate phylogenies from scDNA data is challenged by the complexity of copy number evolution and the inherent noise in single-cell measurements. Several methods have been developed for this purpose, but unlike classical sequence-based phylogenetics, they do not apply probabilistic distance corrections that account for finite-length observations. Such corrections, as in the Jukes-Cantor model, are essential for theoretically consistent tree inference. We present Cellmates, a statistical framework for reconstructing copy number phylogenies from single-cell read counts using probabilistically corrected, additive distances. Such distances are estimated through an efficient expectation-maximization procedure, implemented with the use of a tailored Hidden Markov Model, and then combined with a neighbor joining variant that explicitly accounts for a diploid root node. Results on simulated and real tumor datasets show that Cellmates reconstructs accurate phylogenies and outperforms other methods while remaining computationally efficient. As a consequence, Cellmates provides a statistically grounded framework for copy number evolution from single-cell data.
@article{zampinetti2026cellmates,
author = {Zampinetti, Vittorio and Melin, Harald and Abdolhamdi, Marzie and Lagergren, Jens},
title = {Cellmates: a method for single-cell phylogeny reconstruction with proper evolutionary distances from copy numbers},
journal = {pre-print},
year = {2026}
}
bioRxiv · Cold Spring Harbor Laboratory
Abstract Background: Phylogenetic tree reconstruction from single cell data based on copy-number alterations (CNAs) is an important problem in cancer genomics. Methods have been developed to address this problem by computing pairwise distances between copy-number profiles and employing a tree reconstruction algorithm. Despite the tight interplay between distance estimation and tree reconstruction, these two steps are often treated as separate problems, with the choice of the reconstruction algorithm receiving little attention. Most methods rely on classical Neighbor Joining (NJ), an algorithm designed for unrooted phylogenies that does not account for the fixed diploid root inherent to copy-number evolution.
@article{zampinetti2026srnj,
author = {Zampinetti, Vittorio and Melin, Harald and Hallin, Alva and Lagergren, Jens},
title = {Scalable and robust phylogenetic tree reconstruction from copy-number data with Sparse Rooted Neighbor Joining},
journal = {bioRxiv},
year = {2026},
doi = {10.64898/2026.07.30.739152}
}
Statistics & Probability Letters · Elsevier
Abstract Sampling random spanning arborescences in directed graphs is critical for applications in network analysis, optimization, and machine learning. While many state-of-the-art methods perform well on graphs with high conductance, they often fail or generalize poorly on low-conductance graphs. Inspired by Wilson’s algorithm, we propose a novel sampling approach that overcomes this limitation by using dynamic programming to compute random walk probabilities. This avoids both inefficient walk simulations and numerically unstable Laplacian determinant calculations. Our method demonstrates superior efficiency and sampling quality in simulations, and is the only one to handle low-conductance graphs effectively.
@article{treesampling2025,
author = {Zampinetti, Vittorio and Melin, Harald and Lagergren, Jens},
title = {Sampling random spanning arborescences in graphs with low conductance},
journal = {Statistics & Probability Letters},
volume = {226},
pages = {110481},
year = {2025},
doi = {10.1016/j.spl.2025.110481}
}
Research in Computational Molecular Biology (RECOMB) · Springer Nature Switzerland
Abstract Clonal tree inference brings crucial insights to the analysis of tumor heterogeneity and cancer evolution. Recent progress in single cell sequencing has prompted a demand for more advanced probabilistic models of copy number evolution, coupled with inference methods which can account for the noisy nature of the data along with dependencies between adjacent sites in copy number profiles. We present VICTree, a variational inference based algorithm for joint Bayesian inference of clonal trees, together with a novel Tree-structured Mixture Hidden Markov Model (TSMHMM) which combines HMMs related through a tree with a mixture model. For the tree inference, we introduce a new algorithm, LARS, for sampling directed labeled multifurcating trees. To evaluate our proposed method, we conduct experiments on simulated data and on samples of multiple myeloma and breast cancer. We demonstrate VICTree’s capacity for reliable clustering, clonal tree reconstruction, copy number evolution and the utility of the ELBO for model selection. Lastly, VICTree’s results are compared in terms of quality and speed of inference to other state-of-the-art methods. The code for VICTree is available on GitHub: github.com/Lagergren-Lab/victree.
@inproceedings{zampinetti2024victree,
author = {Melin, Harald and Zampinetti, Vittorio and McPherson, Andrew and Lagergren, Jens},
title = {VICTree - A Variational Inference Method for Clonal Tree Reconstruction},
booktitle = {Research in Computational Molecular Biology},
pages = {429--433},
year = {2024},
publisher = {Springer Nature Switzerland}
}
Notes from research and beyond
Short updates on publications, conferences and technical work.
A short note on defending my PhD thesis and closing an important research chapter.
Presenting the final Cellmates results at the Bertinoro Computational Biology Meeting.
Our article on sampling random spanning arborescences is now available as open access.
Early Cellmates work and a week of computational biology talks in Bertinoro.
A presentation on variational inference for clonal tree reconstruction at SIS 2024.
Presenting our variational-inference work at RECOMB in Boston.