Skip to content

Implement simple versions of Freyja and/or Alcov for comparison #12

Description

@DBecker7

These models are essentially linear models, but with some other assumptions about the data and constraints on the coefficients.

Freyja does something like Lasso regression.

  • df_barcodes is their version of varmat.
  • mix is the frequency (count divided by coverage).
  • depths is the coverage.
    • Both mix and the 0s and 1s of the varmat are multiplied by log(depth + 1) / max(log(depth + 1)) so that mutations with low coverage aren't as important to the estimate.
  • eps and a_eps are small numbers for math precision.
  • adapt is a logical value that allows the algorithm to remove variants with an estimate of 0 and then re-fits the model.

Alcov uses a linear regression (frequency, rather than count and coverage) with constraints to ensure positivity of the coefficients.

  • lmps is the lineage definitions (like varmat).
  • Y is the frequencies
  • muts is the mutation names
    • Alcov is very careful to ensure that mutations always match up - we should be too!

This is a low priority issue, but looking at others' models can be instructive for our own!

Feel free to comment on this issue with any questions you have about their approaches.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions