Skip to content

Commit

Permalink
create newick and nexus trees for beast
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Apr 27, 2021
1 parent c309726 commit b24b1d9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions workflow/rules/phylogeny.smk
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ rule beast:
constant_sites = results_dir + "/snippy_multi/{reads_origin}/{locus_name}/full/snippy-multi.constant_sites.txt",
output:
latlon = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.latlon.txt",
timetree = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.timetree.nwk",
divtree = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.divtree.nwk",
timetree_nwk = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.timetree.nwk",
timetree_nex = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.timetree.nex",
divtree_nwk = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.divtree.nwk",
divtree_nex = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.divtree.nex",
dates = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.dates.txt",
aln = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.fasta",
constant_sites = results_dir + "/beast/{reads_origin}/{locus_name}/{prune}/filter{missing_data}/beast.constant-sites.txt",
Expand All @@ -157,7 +159,10 @@ rule beast:
tail -n+2 {input.tsv} | cut -f 1,19,20 > {output.dates};
cut -f 1,21,22 {input.tsv} > {output.latlon};
cp {input.aln} {output.aln};
cp {input.divtree} {output.divtree};
python3 {scripts_dir}/nexus2newick.py {input.timetree} {output.timetree};
cp {input.divtree} {output.divtree_nwk}
python3 {scripts_dir}/newick2nexus.py {output.divtree_nwk} {output.divtree_nex};
python3 {scripts_dir}/nexus2newick.py {input.timetree} {output.timetree_nwk};
python3 {scripts_dir}/newick2nexus.py {output.timetree_nwk} {output.timetree_nex};
cp {input.constant_sites} {output.constant_sites};
"""

0 comments on commit b24b1d9

Please sign in to comment.