Skip to content

Commit

Permalink
fix bug in filter_sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Apr 27, 2021
1 parent 5dd79f8 commit 2d5b754
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
4 changes: 2 additions & 2 deletions workflow/rules/phylogeny.smk
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ rule lsd:
-s ${{constant_sites}} \
-o {params.prefix} \
-f 100 \
-l '-1' \
-q 0.2 \
-l '-1' \
-q 0.2 \
-r k \
-d {output.dates} \
-g {output.outgroups} \
Expand Down
31 changes: 3 additions & 28 deletions workflow/rules/targets.smk
Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,6 @@ rule snippy_pairwise_local:
# Locus Coverage
#------------------------------------------------------------------------------#

locus_coverage_all_input = results_dir + "/locus_coverage/all/snpden"
locus_coverage_local_input = [path.replace("all", "local") for path in locus_coverage_all_input]
locus_coverage_assembly_input = [path.replace("all", "assembly") for path in locus_coverage_all_input]
locus_coverage_sra_input = [path.replace("all", "sra") for path in locus_coverage_all_input]

rule locus_coverage_all:
input:
locus_coverage_all_input

rule locus_coverage_assembly:
input:
locus_coverage_assembly_input

rule locus_coverage_sra:
input:
locus_coverage_sra_input,

rule locus_coverage_local:
input:
locus_coverage_local_input

locus_coverage_collect_all_input = results_dir + "/locus_coverage_collect/all/locus_coverage.txt"
locus_coverage_collect_local_input = locus_coverage_collect_all_input.replace("all", "local")
locus_coverage_collect_assembly_input = locus_coverage_collect_all_input.replace("all", "assembly")
Expand Down Expand Up @@ -301,7 +280,6 @@ rule iqtree_all:
input:
iqtree_all_input

#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Remove outgroups
iqtree_filter_all_input = expand(results_dir + "/iqtree/all/{locus_name}/full/filter{missing_data}/filter-sites/snippy-multi.snps.aln",
Expand All @@ -311,15 +289,12 @@ rule iqtree_filter_all:
input:
iqtree_filter_all_input



#------------------------------------------------------------------------------#
iqtree_prune_all_input = expand(results_dir + "/iqtree/all/{locus_name}/prune/filter{missing_data}/iqtree.nex",
iqtree_filter_prune_all_input = expand(results_dir + "/iqtree/all/{locus_name}/prune/filter{missing_data}/filter-sites/snippy-multi.snps.aln",
locus_name=config["reference_locus_name"],
missing_data = config["snippy_missing_data"])
rule iqtree_prune_all:
rule iqtree_filter_prune_all:
input:
iqtree_prune_all_input
iqtree_filter_prune_all_input

#------------------------------------------------------------------------------#
# LSD Dating
Expand Down
1 change: 1 addition & 0 deletions workflow/scripts/filter_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
# Constant site format [0,0,0,x]
if count_list.count(0) == 3:
constant_sites += 1
site_type = "constant"
# Biallelic format [0,0,1,x]
elif count_list.count(0) == 2 and count_list.count(1) >= 1:
biallelic_singleton_sites += 1
Expand Down

0 comments on commit 2d5b754

Please sign in to comment.