Skip to content
Permalink
Browse files

Merge pull request #286 from nextstrain/keep-overhang

Add keep-overhangs argument to ancestral
  • Loading branch information...
rneher committed May 22, 2019
2 parents e9c0cf7 + 1b7ec1f commit 9aa4333ff6489d7c5b3143306f6cdcd7af16a171
Showing with 3 additions and 1 deletion.
  1. +3 −1 augur/ancestral.py
@@ -94,6 +94,8 @@ def register_arguments(parser):
parser.add_argument('--output-vcf', type=str, help='name of output VCF file which will include ancestral seqs')
parser.add_argument('--keep-ambiguous', action="store_true", default=False,
help='do not infer nucleotides at ambiguous (N) sites on tip sequences (leave as N). Always true for VCF input.')
parser.add_argument('--keep-overhangs', action="store_true", default=False,
help='do not infer nucleotides for gaps (-) on either side of the alignment')

def run(args):
# check alignment type, set flags, read in if VCF
@@ -134,7 +136,7 @@ def run(args):
return 1

tt = ancestral_sequence_inference(tree=T, aln=aln, ref=ref, marginal=args.inference,
fill_overhangs = True)
fill_overhangs = not(args.keep_overhangs))

if is_vcf or args.keep_ambiguous:
# TreeTime overwrites ambig sites on tips during ancestral reconst.

0 comments on commit 9aa4333

Please sign in to comment.
You can’t perform that action at this time.