From 388c15a2cb56d8c3831602d42ada762611d1605d Mon Sep 17 00:00:00 2001 From: Jennifer Chang Date: Fri, 22 Nov 2024 09:43:13 -0800 Subject: [PATCH] Link out to Nextclade (#49) * Add root sequence to the exported auspice json files * Add 'lineage' to traits inference * Add 'lineage' to global auspice config * Add descriptive names for each of the Nextclade datasets --- .../washington-state-rules.smk | 1 + phylogenetic/defaults/auspice_config.json | 15 ++++++++++++- .../defaults/auspice_config_global.json | 22 ++++++++++++++++++- phylogenetic/defaults/config.yaml | 3 ++- phylogenetic/rules/export.smk | 1 + 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/phylogenetic/build-configs/washington-state/washington-state-rules.smk b/phylogenetic/build-configs/washington-state/washington-state-rules.smk index f2a1c77..2c1af88 100644 --- a/phylogenetic/build-configs/washington-state/washington-state-rules.smk +++ b/phylogenetic/build-configs/washington-state/washington-state-rules.smk @@ -69,6 +69,7 @@ rule export_washington_build: --lat-longs {input.lat_longs} \ --description {input.description} \ --auspice-config {input.auspice_config} \ + --include-root-sequence-inline \ --output {output.auspice} 2>&1 | tee {log} """ diff --git a/phylogenetic/defaults/auspice_config.json b/phylogenetic/defaults/auspice_config.json index 3913356..722a17c 100644 --- a/phylogenetic/defaults/auspice_config.json +++ b/phylogenetic/defaults/auspice_config.json @@ -46,5 +46,18 @@ "map_triplicate": true, "geo_resolution": "state", "distance_measure": "div" - } + }, + "extensions": { + "nextclade": { + "pathogen": { + "schemaVersion":"3.0.0", + "defaultCds": "env", + "attributes": { + "name": "West Nile Virus Washington-State-Focused Tree", + "reference name": "IS88", + "reference accession": "AF481864" + } + } + } + } } diff --git a/phylogenetic/defaults/auspice_config_global.json b/phylogenetic/defaults/auspice_config_global.json index b7b598b..5a1ad86 100644 --- a/phylogenetic/defaults/auspice_config_global.json +++ b/phylogenetic/defaults/auspice_config_global.json @@ -39,5 +39,25 @@ "color_by": "region", "map_triplicate": true, "geo_resolution": "country" - } + }, + "extensions": { + "nextclade": { + "clade_node_attrs": [ + { + "name": "lineage", + "displayName": "Pathoplexus lineage", + "description": "Global WNV lineages based on pathoplexus results." + } + ], + "pathogen": { + "schemaVersion":"3.0.0", + "defaultCds": "env", + "attributes": { + "name": "West Nile Virus Global Tree", + "reference name": "Reconstructed ancestor from global tree", + "reference accession": "none" + } + } + } + } } diff --git a/phylogenetic/defaults/config.yaml b/phylogenetic/defaults/config.yaml index ef9c5c5..ef02a85 100644 --- a/phylogenetic/defaults/config.yaml +++ b/phylogenetic/defaults/config.yaml @@ -74,7 +74,8 @@ refine: traits: metadata_columns: [ 'region', - 'country' + 'country', + 'lineage', ] export: diff --git a/phylogenetic/rules/export.smk b/phylogenetic/rules/export.smk index 41b89d0..d1953b7 100644 --- a/phylogenetic/rules/export.smk +++ b/phylogenetic/rules/export.smk @@ -51,5 +51,6 @@ rule export: --node-data {input.branch_lengths} {input.traits} {input.nt_muts} {input.aa_muts} \ --description {input.description} \ --auspice-config {input.auspice_config} \ + --include-root-sequence-inline \ --output {output.auspice} 2>&1 | tee {log} """