diff --git a/.gitignore b/.gitignore index db7cec0..0c615a5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ src/.orientdb_history build/ dist/ octofludb.egg-info/ +readme.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 26a97ef..a0fd829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +v1.0.2 [2023-11-03] +=================== + + * Make constellation determination more robust with partial, case-insensitive matching + * Correct H3 motif by adding missing site (159) + * Fix fetch-unclassified-swine.rq to include GISAID strains + v1.0.1 [2022-02-16] =================== diff --git a/octofludb/data/fetch-unclassified-swine.rq b/octofludb/data/fetch-unclassified-swine.rq index 9297904..6c79b4e 100644 --- a/octofludb/data/fetch-unclassified-swine.rq +++ b/octofludb/data/fetch-unclassified-swine.rq @@ -1,10 +1,10 @@ PREFIX f: -SELECT DISTINCT ?gb ?seq +SELECT DISTINCT ?seqid ?seq WHERE { ?sid f:host "swine" . ?sid f:has_segment ?gid . - ?gid f:genbank_id ?gb . + ?gid f:seqid ?seqid . ?gid f:dnaseq ?seq . MINUS { ?gid f:clade ?clade . diff --git a/octofludb/formatting.py b/octofludb/formatting.py index 6563db6..ac3f8cd 100644 --- a/octofludb/formatting.py +++ b/octofludb/formatting.py @@ -72,7 +72,7 @@ def _make_constellations(rows: List[Tuple[str, str, str]]) -> List[Tuple[str, st segment_lookup = dict(PB2=0, PB1=1, PA=2, NP=3, M=4, MP=4, NS=5) clade_lookup = dict( - pdm="P", LAIV="V", TX98="V", TRIG="T", humanSeasonal="H", classicalSwine="C", avian="A" + pdm="P", LAIV="V", TRIG="T", humanSeasonal="H", classicalSwine="C", avian="A" ) const: Dict[str, List[str]] = dict() @@ -91,6 +91,11 @@ def _make_constellations(rows: List[Tuple[str, str, str]]) -> List[Tuple[str, st if clade in clade_lookup: char = clade_lookup[clade] + elif "-like" in clade.lower(): + log( + f"{bad('WARNING:')} internal gene clade includes '-like' label ({clade}), assigning constellation character 'X'" + ) + char = "X" else: # add flexible matching for c_lookup, c_letter in clade_lookup.items(): @@ -102,7 +107,7 @@ def _make_constellations(rows: List[Tuple[str, str, str]]) -> List[Tuple[str, st break else: log( - f"{bad('WARNING:')} expected internal gene clade to be one of 'pdm', 'LAIV', 'TX98', 'TRIG', 'classicalSwine', 'humanSeasonal', or 'avian'. Found clade {clade}, assigning constellation character 'X'" + f"{bad('WARNING:')} expected internal gene clade to be one of 'pdm', 'LAIV', 'TRIG', 'classicalSwine', 'humanSeasonal', or 'avian'. Found clade {clade}, assigning constellation character 'X'" ) char = "X" diff --git a/octofludb/ui.py b/octofludb/ui.py index fa6b3ee..7a91c9e 100644 --- a/octofludb/ui.py +++ b/octofludb/ui.py @@ -315,7 +315,7 @@ def upload_motifs(url: str, repo: str) -> List[str]: # find h3 motifs h3_motif_table = script.findMotifs( os.path.join(os.path.dirname(__file__), "data", "get-h3-swine.rq"), - ["h3_motif=145,155,156,158,189"], + ["h3_motif=145,155,156,158,159,189"], "H3", url=url, repo_name=repo, diff --git a/octofludb/version.py b/octofludb/version.py index 5c4105c..7863915 100644 --- a/octofludb/version.py +++ b/octofludb/version.py @@ -1 +1 @@ -__version__ = "1.0.1" +__version__ = "1.0.2"