diff --git a/.dag.png b/.dag.png
deleted file mode 100644
index f3e4928..0000000
Binary files a/.dag.png and /dev/null differ
diff --git a/.dag.svg b/.dag.svg
new file mode 100644
index 0000000..18d44b9
--- /dev/null
+++ b/.dag.svg
@@ -0,0 +1,3435 @@
+
+
+
+
+
+
+snakemake_dag
+
+
+
+0
+
+all
+
+
+
+1
+
+report
+
+
+
+1->0
+
+
+
+
+
+2
+
+demix_plot
+
+
+
+2->1
+
+
+
+
+
+3
+
+demix_plot_data
+
+
+
+3->2
+
+
+
+
+
+4
+
+summarise_demix
+
+
+
+4->3
+
+
+
+
+
+5
+
+demix
+
+
+
+5->4
+
+
+
+
+
+6
+
+demix_preprocessing
+sample: ERR5708628
+
+
+
+6->5
+
+
+
+
+
+7
+
+fetch_mapping_references
+
+
+
+7->6
+
+
+
+
+
+11
+
+demix_preprocessing
+sample: ERR5708640
+
+
+
+7->11
+
+
+
+
+
+13
+
+demix_preprocessing
+sample: ERR5708657
+
+
+
+7->13
+
+
+
+
+
+15
+
+demix_preprocessing
+sample: ERR5709045
+
+
+
+7->15
+
+
+
+
+
+17
+
+demix_preprocessing
+sample: ERR5709055
+
+
+
+7->17
+
+
+
+
+
+19
+
+demix_preprocessing
+sample: ERR5709318
+
+
+
+7->19
+
+
+
+
+
+21
+
+demix_preprocessing
+sample: ERR5709345
+
+
+
+7->21
+
+
+
+
+
+23
+
+demix_preprocessing
+sample: ERR5709354
+
+
+
+7->23
+
+
+
+
+
+25
+
+demix_preprocessing
+sample: ERR5709379
+
+
+
+7->25
+
+
+
+
+
+27
+
+demix_preprocessing
+sample: ERR5709385
+
+
+
+7->27
+
+
+
+
+
+29
+
+demix_preprocessing
+sample: ERR5709420
+
+
+
+7->29
+
+
+
+
+
+31
+
+demix_preprocessing
+sample: ERR5709463
+
+
+
+7->31
+
+
+
+
+
+8
+
+read_bam_refs
+
+
+
+8->7
+
+
+
+
+
+9
+
+demix_barcode_update
+
+
+
+9->1
+
+
+
+
+
+9->5
+
+
+
+
+
+10
+
+demix
+
+
+
+9->10
+
+
+
+
+
+12
+
+demix
+
+
+
+9->12
+
+
+
+
+
+14
+
+demix
+
+
+
+9->14
+
+
+
+
+
+16
+
+demix
+
+
+
+9->16
+
+
+
+
+
+18
+
+demix
+
+
+
+9->18
+
+
+
+
+
+20
+
+demix
+
+
+
+9->20
+
+
+
+
+
+22
+
+demix
+
+
+
+9->22
+
+
+
+
+
+24
+
+demix
+
+
+
+9->24
+
+
+
+
+
+26
+
+demix
+
+
+
+9->26
+
+
+
+
+
+28
+
+demix
+
+
+
+9->28
+
+
+
+
+
+30
+
+demix
+
+
+
+9->30
+
+
+
+
+
+10->4
+
+
+
+
+
+11->10
+
+
+
+
+
+12->4
+
+
+
+
+
+13->12
+
+
+
+
+
+14->4
+
+
+
+
+
+15->14
+
+
+
+
+
+16->4
+
+
+
+
+
+17->16
+
+
+
+
+
+18->4
+
+
+
+
+
+19->18
+
+
+
+
+
+20->4
+
+
+
+
+
+21->20
+
+
+
+
+
+22->4
+
+
+
+
+
+23->22
+
+
+
+
+
+24->4
+
+
+
+
+
+25->24
+
+
+
+
+
+26->4
+
+
+
+
+
+27->26
+
+
+
+
+
+28->4
+
+
+
+
+
+29->28
+
+
+
+
+
+30->4
+
+
+
+
+
+31->30
+
+
+
+
+
+32
+
+context_phylogeny_plot
+
+
+
+32->1
+
+
+
+
+
+33
+
+ml_context_tree
+
+
+
+33->32
+
+
+
+
+
+55
+
+context_phylogeny_data
+
+
+
+33->55
+
+
+
+
+
+34
+
+mask_alignment
+
+
+
+34->33
+
+
+
+
+
+57
+
+diversity_data
+
+
+
+34->57
+
+
+
+
+
+66
+
+reconstruct_ancestral_sequence
+
+
+
+34->66
+
+
+
+
+
+35
+
+align_fasta
+
+
+
+35->34
+
+
+
+
+
+36
+
+fetch_alignment_reference
+
+
+
+36->34
+
+
+
+
+
+36->35
+
+
+
+
+
+51
+
+mask_context
+
+
+
+36->51
+
+
+
+
+
+52
+
+align_context
+
+
+
+36->52
+
+
+
+
+
+203
+
+extract_afwdist_variants
+
+
+
+36->203
+
+
+
+
+
+37
+
+concat_fasta
+
+
+
+37->35
+
+
+
+
+
+54
+
+pangolin_report
+
+
+
+37->54
+
+
+
+
+
+37->55
+
+
+
+
+
+199
+
+allele_freq_tree_plot
+
+
+
+37->199
+
+
+
+
+
+38
+
+rename_fastas
+sample: ERR5708628
+
+
+
+38->37
+
+
+
+
+
+39
+
+rename_fastas
+sample: ERR5708640
+
+
+
+39->37
+
+
+
+
+
+40
+
+rename_fastas
+sample: ERR5708657
+
+
+
+40->37
+
+
+
+
+
+41
+
+rename_fastas
+sample: ERR5709045
+
+
+
+41->37
+
+
+
+
+
+42
+
+rename_fastas
+sample: ERR5709055
+
+
+
+42->37
+
+
+
+
+
+43
+
+rename_fastas
+sample: ERR5709318
+
+
+
+43->37
+
+
+
+
+
+44
+
+rename_fastas
+sample: ERR5709345
+
+
+
+44->37
+
+
+
+
+
+45
+
+rename_fastas
+sample: ERR5709354
+
+
+
+45->37
+
+
+
+
+
+46
+
+rename_fastas
+sample: ERR5709379
+
+
+
+46->37
+
+
+
+
+
+47
+
+rename_fastas
+sample: ERR5709385
+
+
+
+47->37
+
+
+
+
+
+48
+
+rename_fastas
+sample: ERR5709420
+
+
+
+48->37
+
+
+
+
+
+49
+
+rename_fastas
+sample: ERR5709463
+
+
+
+49->37
+
+
+
+
+
+50
+
+fetch_problematic_vcf
+
+
+
+50->34
+
+
+
+
+
+50->51
+
+
+
+
+
+63
+
+mask_tsv
+
+
+
+50->63
+
+
+
+
+
+74
+
+mask_tsv
+
+
+
+50->74
+
+
+
+
+
+82
+
+mask_tsv
+
+
+
+50->82
+
+
+
+
+
+90
+
+mask_tsv
+
+
+
+50->90
+
+
+
+
+
+98
+
+mask_tsv
+
+
+
+50->98
+
+
+
+
+
+106
+
+mask_tsv
+
+
+
+50->106
+
+
+
+
+
+114
+
+mask_tsv
+
+
+
+50->114
+
+
+
+
+
+122
+
+mask_tsv
+
+
+
+50->122
+
+
+
+
+
+130
+
+mask_tsv
+
+
+
+50->130
+
+
+
+
+
+138
+
+mask_tsv
+
+
+
+50->138
+
+
+
+
+
+146
+
+mask_tsv
+
+
+
+50->146
+
+
+
+
+
+154
+
+mask_tsv
+
+
+
+50->154
+
+
+
+
+
+204
+
+merge_mask_sites_vcf
+
+
+
+50->204
+
+
+
+
+
+212
+
+problematic_vcf_to_bed
+
+
+
+50->212
+
+
+
+
+
+51->33
+
+
+
+
+
+51->57
+
+
+
+
+
+52->51
+
+
+
+
+
+53
+
+download_context
+
+
+
+53->52
+
+
+
+
+
+54->53
+
+
+
+
+
+214
+
+summary_table
+
+
+
+54->214
+
+
+
+
+
+55->1
+
+
+
+
+
+55->32
+
+
+
+
+
+56
+
+diversity_plot
+
+
+
+56->1
+
+
+
+
+
+57->1
+
+
+
+
+
+57->56
+
+
+
+
+
+58
+
+polymorphic_sites_over_time_plot
+
+
+
+58->1
+
+
+
+
+
+59
+
+polymorphic_sites_over_time_data
+
+
+
+59->58
+
+
+
+
+
+215
+
+merge_json_files
+
+
+
+59->215
+
+
+
+
+
+60
+
+concat_variants
+
+
+
+60->59
+
+
+
+
+
+161
+
+nv_panel_data
+
+
+
+60->161
+
+
+
+
+
+162
+
+window_data
+
+
+
+60->162
+
+
+
+
+
+172
+
+fill_all_sites
+
+
+
+60->172
+
+
+
+
+
+60->203
+
+
+
+
+
+210
+
+calculate_dnds
+
+
+
+60->210
+
+
+
+
+
+61
+
+merge_annotation
+
+
+
+61->60
+
+
+
+
+
+62
+
+filter_tsv
+
+
+
+62->61
+
+
+
+
+
+71
+
+tsv_to_vcf
+
+
+
+62->71
+
+
+
+
+
+63->62
+
+
+
+
+
+64
+
+snps_to_ancestor
+sample: ERR5708628
+
+
+
+64->63
+
+
+
+
+
+175
+
+bcftools_mpileup_all_sites
+
+
+
+64->175
+
+
+
+
+
+65
+
+ancestor_fasta
+
+
+
+65->64
+
+
+
+
+
+75
+
+snps_to_ancestor
+sample: ERR5708640
+
+
+
+65->75
+
+
+
+
+
+83
+
+snps_to_ancestor
+sample: ERR5708657
+
+
+
+65->83
+
+
+
+
+
+91
+
+snps_to_ancestor
+sample: ERR5709045
+
+
+
+65->91
+
+
+
+
+
+99
+
+snps_to_ancestor
+sample: ERR5709055
+
+
+
+65->99
+
+
+
+
+
+107
+
+snps_to_ancestor
+sample: ERR5709318
+
+
+
+65->107
+
+
+
+
+
+115
+
+snps_to_ancestor
+sample: ERR5709345
+
+
+
+65->115
+
+
+
+
+
+123
+
+snps_to_ancestor
+sample: ERR5709354
+
+
+
+65->123
+
+
+
+
+
+131
+
+snps_to_ancestor
+sample: ERR5709379
+
+
+
+65->131
+
+
+
+
+
+139
+
+snps_to_ancestor
+sample: ERR5709385
+
+
+
+65->139
+
+
+
+
+
+147
+
+snps_to_ancestor
+sample: ERR5709420
+
+
+
+65->147
+
+
+
+
+
+155
+
+snps_to_ancestor
+sample: ERR5709463
+
+
+
+65->155
+
+
+
+
+
+202
+
+afwdist_weighted_distances
+
+
+
+65->202
+
+
+
+
+
+65->203
+
+
+
+
+
+211
+
+n_s_sites
+
+
+
+65->211
+
+
+
+
+
+66->65
+
+
+
+
+
+67
+
+fetch_alignment_annotation
+
+
+
+67->64
+
+
+
+
+
+67->75
+
+
+
+
+
+67->83
+
+
+
+
+
+67->91
+
+
+
+
+
+67->99
+
+
+
+
+
+67->107
+
+
+
+
+
+67->115
+
+
+
+
+
+67->123
+
+
+
+
+
+67->131
+
+
+
+
+
+67->139
+
+
+
+
+
+67->147
+
+
+
+
+
+67->155
+
+
+
+
+
+68
+
+format_vcf_fields_longer
+
+
+
+68->61
+
+
+
+
+
+69
+
+extract_vcf_fields
+
+
+
+69->68
+
+
+
+
+
+70
+
+variants_effect
+
+
+
+70->69
+
+
+
+
+
+71->70
+
+
+
+
+
+72
+
+merge_annotation
+
+
+
+72->60
+
+
+
+
+
+73
+
+filter_tsv
+
+
+
+73->72
+
+
+
+
+
+79
+
+tsv_to_vcf
+
+
+
+73->79
+
+
+
+
+
+74->73
+
+
+
+
+
+75->74
+
+
+
+
+
+177
+
+bcftools_mpileup_all_sites
+
+
+
+75->177
+
+
+
+
+
+76
+
+format_vcf_fields_longer
+
+
+
+76->72
+
+
+
+
+
+77
+
+extract_vcf_fields
+
+
+
+77->76
+
+
+
+
+
+78
+
+variants_effect
+
+
+
+78->77
+
+
+
+
+
+79->78
+
+
+
+
+
+80
+
+merge_annotation
+
+
+
+80->60
+
+
+
+
+
+81
+
+filter_tsv
+
+
+
+81->80
+
+
+
+
+
+87
+
+tsv_to_vcf
+
+
+
+81->87
+
+
+
+
+
+82->81
+
+
+
+
+
+83->82
+
+
+
+
+
+179
+
+bcftools_mpileup_all_sites
+
+
+
+83->179
+
+
+
+
+
+84
+
+format_vcf_fields_longer
+
+
+
+84->80
+
+
+
+
+
+85
+
+extract_vcf_fields
+
+
+
+85->84
+
+
+
+
+
+86
+
+variants_effect
+
+
+
+86->85
+
+
+
+
+
+87->86
+
+
+
+
+
+88
+
+merge_annotation
+
+
+
+88->60
+
+
+
+
+
+89
+
+filter_tsv
+
+
+
+89->88
+
+
+
+
+
+95
+
+tsv_to_vcf
+
+
+
+89->95
+
+
+
+
+
+90->89
+
+
+
+
+
+91->90
+
+
+
+
+
+181
+
+bcftools_mpileup_all_sites
+
+
+
+91->181
+
+
+
+
+
+92
+
+format_vcf_fields_longer
+
+
+
+92->88
+
+
+
+
+
+93
+
+extract_vcf_fields
+
+
+
+93->92
+
+
+
+
+
+94
+
+variants_effect
+
+
+
+94->93
+
+
+
+
+
+95->94
+
+
+
+
+
+96
+
+merge_annotation
+
+
+
+96->60
+
+
+
+
+
+97
+
+filter_tsv
+
+
+
+97->96
+
+
+
+
+
+103
+
+tsv_to_vcf
+
+
+
+97->103
+
+
+
+
+
+98->97
+
+
+
+
+
+99->98
+
+
+
+
+
+183
+
+bcftools_mpileup_all_sites
+
+
+
+99->183
+
+
+
+
+
+100
+
+format_vcf_fields_longer
+
+
+
+100->96
+
+
+
+
+
+101
+
+extract_vcf_fields
+
+
+
+101->100
+
+
+
+
+
+102
+
+variants_effect
+
+
+
+102->101
+
+
+
+
+
+103->102
+
+
+
+
+
+104
+
+merge_annotation
+
+
+
+104->60
+
+
+
+
+
+105
+
+filter_tsv
+
+
+
+105->104
+
+
+
+
+
+111
+
+tsv_to_vcf
+
+
+
+105->111
+
+
+
+
+
+106->105
+
+
+
+
+
+107->106
+
+
+
+
+
+185
+
+bcftools_mpileup_all_sites
+
+
+
+107->185
+
+
+
+
+
+108
+
+format_vcf_fields_longer
+
+
+
+108->104
+
+
+
+
+
+109
+
+extract_vcf_fields
+
+
+
+109->108
+
+
+
+
+
+110
+
+variants_effect
+
+
+
+110->109
+
+
+
+
+
+111->110
+
+
+
+
+
+112
+
+merge_annotation
+
+
+
+112->60
+
+
+
+
+
+113
+
+filter_tsv
+
+
+
+113->112
+
+
+
+
+
+119
+
+tsv_to_vcf
+
+
+
+113->119
+
+
+
+
+
+114->113
+
+
+
+
+
+115->114
+
+
+
+
+
+187
+
+bcftools_mpileup_all_sites
+
+
+
+115->187
+
+
+
+
+
+116
+
+format_vcf_fields_longer
+
+
+
+116->112
+
+
+
+
+
+117
+
+extract_vcf_fields
+
+
+
+117->116
+
+
+
+
+
+118
+
+variants_effect
+
+
+
+118->117
+
+
+
+
+
+119->118
+
+
+
+
+
+120
+
+merge_annotation
+
+
+
+120->60
+
+
+
+
+
+121
+
+filter_tsv
+
+
+
+121->120
+
+
+
+
+
+127
+
+tsv_to_vcf
+
+
+
+121->127
+
+
+
+
+
+122->121
+
+
+
+
+
+123->122
+
+
+
+
+
+189
+
+bcftools_mpileup_all_sites
+
+
+
+123->189
+
+
+
+
+
+124
+
+format_vcf_fields_longer
+
+
+
+124->120
+
+
+
+
+
+125
+
+extract_vcf_fields
+
+
+
+125->124
+
+
+
+
+
+126
+
+variants_effect
+
+
+
+126->125
+
+
+
+
+
+127->126
+
+
+
+
+
+128
+
+merge_annotation
+
+
+
+128->60
+
+
+
+
+
+129
+
+filter_tsv
+
+
+
+129->128
+
+
+
+
+
+135
+
+tsv_to_vcf
+
+
+
+129->135
+
+
+
+
+
+130->129
+
+
+
+
+
+131->130
+
+
+
+
+
+191
+
+bcftools_mpileup_all_sites
+
+
+
+131->191
+
+
+
+
+
+132
+
+format_vcf_fields_longer
+
+
+
+132->128
+
+
+
+
+
+133
+
+extract_vcf_fields
+
+
+
+133->132
+
+
+
+
+
+134
+
+variants_effect
+
+
+
+134->133
+
+
+
+
+
+135->134
+
+
+
+
+
+136
+
+merge_annotation
+
+
+
+136->60
+
+
+
+
+
+137
+
+filter_tsv
+
+
+
+137->136
+
+
+
+
+
+143
+
+tsv_to_vcf
+
+
+
+137->143
+
+
+
+
+
+138->137
+
+
+
+
+
+139->138
+
+
+
+
+
+193
+
+bcftools_mpileup_all_sites
+
+
+
+139->193
+
+
+
+
+
+140
+
+format_vcf_fields_longer
+
+
+
+140->136
+
+
+
+
+
+141
+
+extract_vcf_fields
+
+
+
+141->140
+
+
+
+
+
+142
+
+variants_effect
+
+
+
+142->141
+
+
+
+
+
+143->142
+
+
+
+
+
+144
+
+merge_annotation
+
+
+
+144->60
+
+
+
+
+
+145
+
+filter_tsv
+
+
+
+145->144
+
+
+
+
+
+151
+
+tsv_to_vcf
+
+
+
+145->151
+
+
+
+
+
+146->145
+
+
+
+
+
+147->146
+
+
+
+
+
+195
+
+bcftools_mpileup_all_sites
+
+
+
+147->195
+
+
+
+
+
+148
+
+format_vcf_fields_longer
+
+
+
+148->144
+
+
+
+
+
+149
+
+extract_vcf_fields
+
+
+
+149->148
+
+
+
+
+
+150
+
+variants_effect
+
+
+
+150->149
+
+
+
+
+
+151->150
+
+
+
+
+
+152
+
+merge_annotation
+
+
+
+152->60
+
+
+
+
+
+153
+
+filter_tsv
+
+
+
+153->152
+
+
+
+
+
+159
+
+tsv_to_vcf
+
+
+
+153->159
+
+
+
+
+
+154->153
+
+
+
+
+
+155->154
+
+
+
+
+
+197
+
+bcftools_mpileup_all_sites
+
+
+
+155->197
+
+
+
+
+
+156
+
+format_vcf_fields_longer
+
+
+
+156->152
+
+
+
+
+
+157
+
+extract_vcf_fields
+
+
+
+157->156
+
+
+
+
+
+158
+
+variants_effect
+
+
+
+158->157
+
+
+
+
+
+159->158
+
+
+
+
+
+160
+
+nv_panel_plot
+
+
+
+160->1
+
+
+
+
+
+161->160
+
+
+
+
+
+167
+
+nv_panel_zoom_on_feature_data
+region_name: S
+
+
+
+161->167
+
+
+
+
+
+161->215
+
+
+
+
+
+162->160
+
+
+
+
+
+168
+
+window_zoom_on_feature_data
+region_name: S
+
+
+
+162->168
+
+
+
+
+
+162->215
+
+
+
+
+
+163
+
+fetch_reference_gb
+
+
+
+163->162
+
+
+
+
+
+165
+
+filter_genbank_features
+
+
+
+163->165
+
+
+
+
+
+164
+
+extract_genbank_regions
+
+
+
+164->160
+
+
+
+
+
+166
+
+nv_panel_plot_S
+
+
+
+164->166
+
+
+
+
+
+164->167
+
+
+
+
+
+164->168
+
+
+
+
+
+165->164
+
+
+
+
+
+165->211
+
+
+
+
+
+166->1
+
+
+
+
+
+167->166
+
+
+
+
+
+168->166
+
+
+
+
+
+169
+
+create_empty_file
+
+
+
+169->166
+
+
+
+
+
+170
+
+af_time_correlation_plot
+
+
+
+170->1
+
+
+
+
+
+171
+
+af_time_correlation_data
+
+
+
+171->170
+
+
+
+
+
+198
+
+af_trajectory_panel_plot
+
+
+
+171->198
+
+
+
+
+
+172->171
+
+
+
+
+
+213
+
+pairwise_trajectory_correlation_data
+
+
+
+172->213
+
+
+
+
+
+173
+
+merge_filtered_mpileup_all_sites
+
+
+
+173->172
+
+
+
+
+
+174
+
+filter_mpileup_all_sites
+
+
+
+174->173
+
+
+
+
+
+206
+
+merge_fail_mpileup_all_sites
+
+
+
+174->206
+
+
+
+
+
+175->174
+
+
+
+
+
+176
+
+filter_mpileup_all_sites
+
+
+
+176->173
+
+
+
+
+
+176->206
+
+
+
+
+
+177->176
+
+
+
+
+
+178
+
+filter_mpileup_all_sites
+
+
+
+178->173
+
+
+
+
+
+178->206
+
+
+
+
+
+179->178
+
+
+
+
+
+180
+
+filter_mpileup_all_sites
+
+
+
+180->173
+
+
+
+
+
+180->206
+
+
+
+
+
+181->180
+
+
+
+
+
+182
+
+filter_mpileup_all_sites
+
+
+
+182->173
+
+
+
+
+
+182->206
+
+
+
+
+
+183->182
+
+
+
+
+
+184
+
+filter_mpileup_all_sites
+
+
+
+184->173
+
+
+
+
+
+184->206
+
+
+
+
+
+185->184
+
+
+
+
+
+186
+
+filter_mpileup_all_sites
+
+
+
+186->173
+
+
+
+
+
+186->206
+
+
+
+
+
+187->186
+
+
+
+
+
+188
+
+filter_mpileup_all_sites
+
+
+
+188->173
+
+
+
+
+
+188->206
+
+
+
+
+
+189->188
+
+
+
+
+
+190
+
+filter_mpileup_all_sites
+
+
+
+190->173
+
+
+
+
+
+190->206
+
+
+
+
+
+191->190
+
+
+
+
+
+192
+
+filter_mpileup_all_sites
+
+
+
+192->173
+
+
+
+
+
+192->206
+
+
+
+
+
+193->192
+
+
+
+
+
+194
+
+filter_mpileup_all_sites
+
+
+
+194->173
+
+
+
+
+
+194->206
+
+
+
+
+
+195->194
+
+
+
+
+
+196
+
+filter_mpileup_all_sites
+
+
+
+196->173
+
+
+
+
+
+196->206
+
+
+
+
+
+197->196
+
+
+
+
+
+198->1
+
+
+
+
+
+199->1
+
+
+
+
+
+200
+
+allele_freq_tree_data
+
+
+
+200->199
+
+
+
+
+
+208
+
+time_signal_data
+
+
+
+200->208
+
+
+
+
+
+201
+
+format_afwdist_results
+
+
+
+201->200
+
+
+
+
+
+202->201
+
+
+
+
+
+203->202
+
+
+
+
+
+204->203
+
+
+
+
+
+205
+
+compile_fail_sites_vcf
+
+
+
+205->204
+
+
+
+
+
+206->205
+
+
+
+
+
+207
+
+time_signal_plot
+
+
+
+207->1
+
+
+
+
+
+208->1
+
+
+
+
+
+208->207
+
+
+
+
+
+209
+
+dnds_plots
+
+
+
+209->1
+
+
+
+
+
+210->209
+
+
+
+
+
+211->210
+
+
+
+
+
+212->210
+
+
+
+
+
+212->211
+
+
+
+
+
+213->1
+
+
+
+
+
+214->1
+
+
+
+
+
+215->1
+
+
+
+
+
diff --git a/.rulegraph.png b/.rulegraph.png
deleted file mode 100644
index d3bcf3c..0000000
Binary files a/.rulegraph.png and /dev/null differ
diff --git a/.rulegraph.svg b/.rulegraph.svg
new file mode 100644
index 0000000..114780a
--- /dev/null
+++ b/.rulegraph.svg
@@ -0,0 +1,1153 @@
+
+
+
+
+
+
+snakemake_dag
+
+
+
+0
+
+all
+
+
+
+1
+
+report
+
+
+
+1->0
+
+
+
+
+
+2
+
+demix_plot
+
+
+
+2->1
+
+
+
+
+
+3
+
+demix_plot_data
+
+
+
+3->2
+
+
+
+
+
+4
+
+summarise_demix
+
+
+
+4->3
+
+
+
+
+
+5
+
+demix
+
+
+
+5->4
+
+
+
+
+
+6
+
+demix_preprocessing
+
+
+
+6->5
+
+
+
+
+
+7
+
+fetch_mapping_references
+
+
+
+7->6
+
+
+
+
+
+8
+
+read_bam_refs
+
+
+
+8->7
+
+
+
+
+
+9
+
+demix_barcode_update
+
+
+
+9->1
+
+
+
+
+
+9->5
+
+
+
+
+
+10
+
+context_phylogeny_plot
+
+
+
+10->1
+
+
+
+
+
+11
+
+ml_context_tree
+
+
+
+11->10
+
+
+
+
+
+22
+
+context_phylogeny_data
+
+
+
+11->22
+
+
+
+
+
+12
+
+mask_alignment
+
+
+
+12->11
+
+
+
+
+
+24
+
+diversity_data
+
+
+
+12->24
+
+
+
+
+
+33
+
+reconstruct_ancestral_sequence
+
+
+
+12->33
+
+
+
+
+
+13
+
+align_fasta
+
+
+
+13->12
+
+
+
+
+
+14
+
+fetch_alignment_reference
+
+
+
+14->12
+
+
+
+
+
+14->13
+
+
+
+
+
+18
+
+mask_context
+
+
+
+14->18
+
+
+
+
+
+19
+
+align_context
+
+
+
+14->19
+
+
+
+
+
+60
+
+extract_afwdist_variants
+
+
+
+14->60
+
+
+
+
+
+15
+
+concat_fasta
+
+
+
+15->13
+
+
+
+
+
+21
+
+pangolin_report
+
+
+
+15->21
+
+
+
+
+
+15->22
+
+
+
+
+
+56
+
+allele_freq_tree_plot
+
+
+
+15->56
+
+
+
+
+
+16
+
+rename_fastas
+
+
+
+16->15
+
+
+
+
+
+17
+
+fetch_problematic_vcf
+
+
+
+17->12
+
+
+
+
+
+17->18
+
+
+
+
+
+30
+
+mask_tsv
+
+
+
+17->30
+
+
+
+
+
+61
+
+merge_mask_sites_vcf
+
+
+
+17->61
+
+
+
+
+
+69
+
+problematic_vcf_to_bed
+
+
+
+17->69
+
+
+
+
+
+18->11
+
+
+
+
+
+18->24
+
+
+
+
+
+19->18
+
+
+
+
+
+20
+
+download_context
+
+
+
+20->19
+
+
+
+
+
+21->20
+
+
+
+
+
+71
+
+summary_table
+
+
+
+21->71
+
+
+
+
+
+22->1
+
+
+
+
+
+22->10
+
+
+
+
+
+23
+
+diversity_plot
+
+
+
+23->1
+
+
+
+
+
+24->1
+
+
+
+
+
+24->23
+
+
+
+
+
+25
+
+polymorphic_sites_over_time_plot
+
+
+
+25->1
+
+
+
+
+
+26
+
+polymorphic_sites_over_time_data
+
+
+
+26->25
+
+
+
+
+
+72
+
+merge_json_files
+
+
+
+26->72
+
+
+
+
+
+27
+
+concat_variants
+
+
+
+27->26
+
+
+
+
+
+40
+
+nv_panel_data
+
+
+
+27->40
+
+
+
+
+
+41
+
+window_data
+
+
+
+27->41
+
+
+
+
+
+51
+
+fill_all_sites
+
+
+
+27->51
+
+
+
+
+
+27->60
+
+
+
+
+
+67
+
+calculate_dnds
+
+
+
+27->67
+
+
+
+
+
+28
+
+merge_annotation
+
+
+
+28->27
+
+
+
+
+
+29
+
+filter_tsv
+
+
+
+29->28
+
+
+
+
+
+38
+
+tsv_to_vcf
+
+
+
+29->38
+
+
+
+
+
+30->29
+
+
+
+
+
+31
+
+snps_to_ancestor
+
+
+
+31->30
+
+
+
+
+
+54
+
+bcftools_mpileup_all_sites
+
+
+
+31->54
+
+
+
+
+
+32
+
+ancestor_fasta
+
+
+
+32->31
+
+
+
+
+
+59
+
+afwdist_weighted_distances
+
+
+
+32->59
+
+
+
+
+
+32->60
+
+
+
+
+
+68
+
+n_s_sites
+
+
+
+32->68
+
+
+
+
+
+33->32
+
+
+
+
+
+34
+
+fetch_alignment_annotation
+
+
+
+34->31
+
+
+
+
+
+35
+
+format_vcf_fields_longer
+
+
+
+35->28
+
+
+
+
+
+36
+
+extract_vcf_fields
+
+
+
+36->35
+
+
+
+
+
+37
+
+variants_effect
+
+
+
+37->36
+
+
+
+
+
+38->37
+
+
+
+
+
+39
+
+nv_panel_plot
+
+
+
+39->1
+
+
+
+
+
+40->39
+
+
+
+
+
+46
+
+nv_panel_zoom_on_feature_data
+
+
+
+40->46
+
+
+
+
+
+40->72
+
+
+
+
+
+41->39
+
+
+
+
+
+47
+
+window_zoom_on_feature_data
+
+
+
+41->47
+
+
+
+
+
+41->72
+
+
+
+
+
+42
+
+fetch_reference_gb
+
+
+
+42->41
+
+
+
+
+
+44
+
+filter_genbank_features
+
+
+
+42->44
+
+
+
+
+
+43
+
+extract_genbank_regions
+
+
+
+43->39
+
+
+
+
+
+45
+
+nv_panel_plot_S
+
+
+
+43->45
+
+
+
+
+
+43->46
+
+
+
+
+
+43->47
+
+
+
+
+
+44->43
+
+
+
+
+
+44->68
+
+
+
+
+
+45->1
+
+
+
+
+
+46->45
+
+
+
+
+
+47->45
+
+
+
+
+
+48
+
+create_empty_file
+
+
+
+48->45
+
+
+
+
+
+49
+
+af_time_correlation_plot
+
+
+
+49->1
+
+
+
+
+
+50
+
+af_time_correlation_data
+
+
+
+50->49
+
+
+
+
+
+55
+
+af_trajectory_panel_plot
+
+
+
+50->55
+
+
+
+
+
+51->50
+
+
+
+
+
+70
+
+pairwise_trajectory_correlation_data
+
+
+
+51->70
+
+
+
+
+
+52
+
+merge_filtered_mpileup_all_sites
+
+
+
+52->51
+
+
+
+
+
+53
+
+filter_mpileup_all_sites
+
+
+
+53->52
+
+
+
+
+
+63
+
+merge_fail_mpileup_all_sites
+
+
+
+53->63
+
+
+
+
+
+54->53
+
+
+
+
+
+55->1
+
+
+
+
+
+56->1
+
+
+
+
+
+57
+
+allele_freq_tree_data
+
+
+
+57->56
+
+
+
+
+
+65
+
+time_signal_data
+
+
+
+57->65
+
+
+
+
+
+58
+
+format_afwdist_results
+
+
+
+58->57
+
+
+
+
+
+59->58
+
+
+
+
+
+60->59
+
+
+
+
+
+61->60
+
+
+
+
+
+62
+
+compile_fail_sites_vcf
+
+
+
+62->61
+
+
+
+
+
+63->62
+
+
+
+
+
+64
+
+time_signal_plot
+
+
+
+64->1
+
+
+
+
+
+65->1
+
+
+
+
+
+65->64
+
+
+
+
+
+66
+
+dnds_plots
+
+
+
+66->1
+
+
+
+
+
+67->66
+
+
+
+
+
+68->67
+
+
+
+
+
+69->67
+
+
+
+
+
+69->68
+
+
+
+
+
+70->1
+
+
+
+
+
+71->1
+
+
+
+
+
+72->1
+
+
+
+
+
diff --git a/.rulegraph_sv.svg b/.rulegraph_sv.svg
index d7ff0c7..b82d82f 100644
--- a/.rulegraph_sv.svg
+++ b/.rulegraph_sv.svg
@@ -1 +1 @@
-read_bam_refs demix_barcode_update fetch_alignment_reference rename_fastas fetch_problematic_vcf fetch_alignment_annotation fetch_reference_gb create_empty_file fetch_mapping_references concat_fasta filter_genbank_features demix_preprocessing align_fasta pangolin_report extract_genbank_regions demix mask_alignment download_context summary_table summarise_demix reconstruct_ancestral_sequence align_context demix_plot_data ancestor_fasta mask_context demix_plot snps_to_ancestor n_s_sites ml_context_tree diversity_data mask_tsv context_phylogeny_data diversity_plot filter_tsv context_phylogeny_plot tsv_to_vcf variants_effect extract_vcf_fields format_vcf_fields_longer merge_annotation concat_variants polymorphic_sites_over_time_data nv_panel_data window_data af_time_correlation_data extract_afwdist_variants calculate_dnds pairwise_trajectory_correlation polymorphic_sites_over_time_plot nv_panel_zoom_on_feature_data nv_panel_plot window_zoom_on_feature_data merge_json_files af_time_correlation_plot af_trajectory_panel_plot afwdist_weighted_distances dnds_plots nv_panel_plot_S format_afwdist_results allele_freq_tree_data allele_freq_tree_plot time_signal_data time_signal_plot report
\ No newline at end of file
+read_bam_refs demix_barcode_update fetch_alignment_reference rename_fastas fetch_problematic_vcf fetch_alignment_annotation fetch_reference_gb create_empty_file fetch_mapping_references concat_fasta problematic_vcf_to_bed filter_genbank_features demix_preprocessing align_fasta pangolin_report extract_genbank_regions demix mask_alignment download_context summary_table summarise_demix reconstruct_ancestral_sequence align_context demix_plot_data ancestor_fasta mask_context demix_plot snps_to_ancestor n_s_sites ml_context_tree diversity_data mask_tsv bcftools_mpileup_all_sites context_phylogeny_data diversity_plot filter_tsv filter_mpileup_all_sites context_phylogeny_plot tsv_to_vcf merge_filtered_mpileup_all_sites merge_fail_mpileup_all_sites variants_effect compile_fail_sites_vcf extract_vcf_fields merge_mask_sites_vcf format_vcf_fields_longer merge_annotation concat_variants polymorphic_sites_over_time_data nv_panel_data window_data fill_all_sites extract_afwdist_variants calculate_dnds polymorphic_sites_over_time_plot nv_panel_zoom_on_feature_data nv_panel_plot window_zoom_on_feature_data merge_json_files af_time_correlation_data pairwise_trajectory_correlation_data afwdist_weighted_distances dnds_plots nv_panel_plot_S af_time_correlation_plot af_trajectory_panel_plot format_afwdist_results allele_freq_tree_data allele_freq_tree_plot time_signal_data time_signal_plot report
\ No newline at end of file
diff --git a/config/README.md b/config/README.md
index f5cc413..dc0914a 100644
--- a/config/README.md
+++ b/config/README.md
@@ -207,10 +207,15 @@ All of the following variables are pre-defined in [config.yaml](/config/config.y
Snakemake enables easy visualization of workflows and rule relationships. The `--rulegraph` option outputs a DOT file that describes dependencies between rules. The example below produces an image using Graphviz:
```shell
-snakemake --forceall --rulegraph | dot -Tpng >.rulegraph.png
+snakemake --forceall --rulegraph | dot -Grankdir=LR -Tsvg >.rulegraph.svg
```
-
+
+Rule graph image
+
+
+
+
The same graph can also be rendered with other tools such as [snakevision](https://github.com/OpenOmics/snakevision) (v0.1.0).
@@ -218,15 +223,25 @@ The same graph can also be rendered with other tools such as [snakevision](https
snakemake --forceall --rulegraph | snakevision -s all -o .rulegraph_sv.svg
```
+
+Snakevision rule graph image
+

-The `--dag` option emits an directed acyclic graph (DAG) that corresponds to the rule instances that would be executed for the current dataset. The example below produces an image using Graphviz:
+
+
+The `--dag` option emits an directed acyclic graph (DAG) that corresponds to the rule instances that would be executed for the target dataset. The example below produces an image using Graphviz (for [data](https://doi.org/10.20350/digitalCSIC/15648) from [our study](https://doi.org/10.1093/ve/veae018)):
```shell
-snakemake --forceall --dag | dot -Tpng >.dag.png
+snakemake --forceall --dag | dot -Grankdir=LR -Tsvg >.dag.svg
```
-
+
+DAG image
+
+
+
+
## Run modes