andersen-lab / Freyja

Depth-weighted De-Mixing
BSD 2-Clause "Simplified" License
100 stars 29 forks source link

Custom confing.yaml #93

Closed whottel closed 1 year ago

whottel commented 1 year ago

Hello,

I have noticed on recent runs that the lineage grouping rules I have in my config.yaml file are not consistenly followed when running freyja dashboard. (I am still using version 1.3.10) For example I have the following:

Lineages:
  grp_1:
    name: "BA.2"
    members:
      - "BA.2*"
    color: "orange"
  grp_2:
    name: "BA.4.6"
    members:
      - "BA.4.6*"
    color: "olive"
  grp_3:
    name: "BA.4"
    members:
      - "BA.4*"
    color: "green"   
  grp_4:
    name: "BA.5"
    members:
      - "BA.5*"      
    color: "red"  

In this case the BA.5 sublineages BA.5.2.3 and BA.5.3.2 are grouped correctly, but BA.5.2.17, BA.5.1.10, and BA.5.5.3 are still showing up individually. Additionally, how can I write these rules so that BE and BF can also be grouped under BA.5?

Thanks, Wes

joshuailevy commented 1 year ago

Hi Wes,

Thanks for bringing this up. I believe this is due to an issue upstream of freyja (as a result of an auto-updating issue in pango/cov-lineages) and am in the process of working this out with them now.

In general, you should be able to group arbitrary members within your groups by listing them in the "members" section like:

members:
  - "BA.5*"
  - "BE"
  - "BF"

Josh

joshuailevy commented 1 year ago

@whottel I believe your issue should be solved now. As mentioned, there was an upstream issue with Pango that I had to resolve with them.

Check out https://github.com/outbreak-info/outbreak.info/blob/master/curated_reports_prep/lineages.yml#L12096 for all of the lineages considered BA.5 descendants. These changes should now be reflected in Freyja (once you run an update).

Josh

whottel commented 1 year ago

@joshuailevy I am still running into the same issues using freyja versions 1.3.10 and 1.3.11. I think the problem is that I use freyja update --outdir to specify a directory for curated_lineages.json and lineages.yml that I can write to, since I am using a singularity image. Can the updated lineages.yml with the appropriate relationship structure be specified in the config file when running freyja dash?

Thanks, Wes

joshuailevy commented 1 year ago

Ah, that's a good point. At the moment, the dash function is hard-coded to pull the lineages.yml file from the data folder within the freyja repo. Sorry about that, I'll make sure to add in an option to supply your own lineages.yml file for dash soon.

whottel commented 1 year ago

Sounds good, thanks!