diff --git a/profiles/europe/builds.yaml b/profiles/europe/builds.yaml index 39d012b..bc20c83 100644 --- a/profiles/europe/builds.yaml +++ b/profiles/europe/builds.yaml @@ -76,6 +76,7 @@ array-builds: annotation: "config/{lineage}/{{segment}}/genemap.gff" tree_exclude_sites: "config/{lineage}/{{segment}}/exclude-sites.txt" clades: "config/{lineage}/ha/clades.tsv" + subclades: "config/{lineage}/{{segment}}/subclades.tsv" auspice_config: "config/{lineage}/auspice_config.json" vaccines: "config/{lineage}/vaccine.json" enable_glycosylation: true @@ -113,6 +114,7 @@ array-builds: annotation: "config/{lineage}/{{segment}}/genemap.gff" tree_exclude_sites: "config/{lineage}/{{segment}}/exclude-sites.txt" clades: "config/{lineage}/ha/clades.tsv" + subclades: "config/{lineage}/{{segment}}/subclades.tsv" auspice_config: "config/{lineage}/auspice_config.json" vaccines: "config/{lineage}/vaccine.json" enable_glycosylation: true @@ -163,6 +165,7 @@ array-builds: annotation: "config/{lineage}/{{segment}}/genemap.gff" tree_exclude_sites: "config/{lineage}/{{segment}}/exclude-sites.txt" clades: "config/{lineage}/ha/clades.tsv" + subclades: "config/{lineage}/{{segment}}/subclades.tsv" auspice_config: "config/{lineage}/auspice_config.json" vaccines: "config/{lineage}/vaccine.json" enable_glycosylation: true diff --git a/scripts/flag_outliers.py b/scripts/flag_outliers.py index d94bab2..9a65c51 100644 --- a/scripts/flag_outliers.py +++ b/scripts/flag_outliers.py @@ -90,7 +90,7 @@ def prepare_tree(T): parser.add_argument('--reroot', action="store_true", help="reroot the tree") parser.add_argument('--optimize', action="store_true", help="optimize sigma and mu") parser.add_argument('--dates', type=str, help='csv/tsv file with dates for each sequence') - parser.add_argument('--keep-strains', type=str, help='a list of strains to keep in the output tree regardless of outlier status (i.e., reference strains that need to be retained in the build)') + parser.add_argument('--keep-strains', type=str, nargs='+', help='a list of strains to keep in the output tree regardless of outlier status (i.e., reference strains that need to be retained in the build)') parser.add_argument('--output-outliers', type=str, help='file for outliers') parser.add_argument('--output-tree', type=str, help='file for pruned tree') @@ -156,8 +156,11 @@ def prepare_tree(T): if args.output_tree: keep_strains = set() if args.keep_strains: - with open(args.keep_strains, "r", encoding="utf-8") as fh: - keep_strains = {line.strip() for line in fh} + if type(args.keep_strains)==str: + args.keep_strains = [args.keep_strains] + for fname in args.keep_strains: + with open(fname, "r", encoding="utf-8") as fh: + keep_strains = {line.strip() for line in fh} from Bio import Phylo T = tt.tree