https://github.com/andersen-lab/freyja
Depth-weighted De-Mixing
https://github.com/andersen-lab/freyja
Last synced: about 1 year ago
JSON representation
Depth-weighted De-Mixing
- Host: GitHub
- URL: https://github.com/andersen-lab/freyja
- Owner: andersen-lab
- License: bsd-2-clause
- Created: 2021-10-15T15:59:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T01:44:43.000Z (about 1 year ago)
- Last Synced: 2025-04-10T02:19:04.467Z (about 1 year ago)
- Language: HTML
- Size: 101 MB
- Stars: 110
- Watchers: 13
- Forks: 33
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Freyja
[](https://github.com/andersen-lab/Freyja/actions/workflows/python-package-conda.yml) [](https://anaconda.org/bioconda/freyja) 
Detailed documentation, including installation, usage, and examples can be found [here](https://andersen-lab.github.io/Freyja/index.html#).
Freyja is a tool to recover relative lineage abundances from mixed SARS-CoV-2 samples from a sequencing dataset (BAM aligned to the Hu-1 reference). The method uses lineage-determining mutational "barcodes" derived from the UShER global phylogenetic tree as a basis set to solve the constrained (unit sum, non-negative) de-mixing problem.
Freyja is intended as a post-processing step after primer trimming and variant calling in [iVar (Grubaugh and Gangavaparu et al., 2019)](https://github.com/andersen-lab/ivar). From measurements of SNV freqency and sequencing depth at each position in the genome, Freyja returns an estimate of the true lineage abundances in the sample.
To ensure reproducibility of results, we provide old (timestamped) barcodes and metadata in the separate [Freyja-data](https://github.com/andersen-lab/Freyja-data) repository. Barcode version can be checked using the `freyja demix --version` command.
NOTE: Freyja barcodes are now stored in compressed feather format, as the initial csv barcode file became too large. Specific lineage definitions are now provided in [here](https://github.com/andersen-lab/Freyja/blob/main/freyja/data/lineage_mutations.json).
## Installation via conda
Freyja is entirely written in Python 3, but requires preprocessing by tools like iVar and [samtools](https://github.com/samtools/samtools) mpileup to generate the required input data. We recommend using python3.10 to take advantage of the Clarabel solver, but Freyja has been tested on python versions from 3.7 to 3.10. First, create an environment for freyja
```
conda create -n freyja-env
```
then add the following channels
```
conda config --add channels bioconda
conda config --add channels conda-forge
```
and then install freyja
```
conda install freyja
```