Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ancestral): Add optional Nextclade GFF3 compatibility mode #1664

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Nov 10, 2024

  1. feat(ancestral): Add optional Nextclade GFF3 compatibility mode

    Until this PR, it was hard to use augur ancestral with a genome annotation gff3 from a Nextclade dataset for multiple reasons:
    - The GFF reader in augur looks for "gene" features only, while Nextclade 3 uses primarily CDS (gene only for backwards compatibility)
    - Augur's GFF reader doesn't support compound features
    - It takes the "gene"/"feature" name in the order "gene" > "gene_name" > "locus_tag", which differs from Nextclade's order
    
    This meant that users had to create a Genbank file, just for the purpose of running augur ancestral.
    That was doable but tedious.
    
    This PR solves the problem by adding a new GFF reader mode that is designed to be as compatible with Nextclade as possible. That means:
    - It looks for CDS features (for simplicity it ignores Nextclade's gene backwards compatibility)
    - It supports compound features
    - It takes the feature name in the exact same order as Nextclade
    
    The new mode is activated by passing the `--nextclade-compatibility` flag to augur ancestral.
    
    It does no harm to anyone who does not want to use it.
    
    It results in some code duplication, but I think it's totally worth it for the sake of usability.
    I have already started using it in some of my private builds and it works like a charm.
    corneliusroemer committed Nov 10, 2024
    Configuration menu
    Copy the full SHA
    26f18b7 View commit details
    Browse the repository at this point in the history
  2. fix test

    corneliusroemer committed Nov 10, 2024
    Configuration menu
    Copy the full SHA
    46d2f81 View commit details
    Browse the repository at this point in the history
  3. Propagate valid types

    corneliusroemer committed Nov 10, 2024
    Configuration menu
    Copy the full SHA
    4571e59 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5d8fe73 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e96773 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1280a95 View commit details
    Browse the repository at this point in the history
  7. Update augur/utils.py

    corneliusroemer committed Nov 10, 2024
    Configuration menu
    Copy the full SHA
    566150e View commit details
    Browse the repository at this point in the history