Skip to content

Commit

Permalink
removing multiple inclusion of common.smk
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaOb21 committed Mar 27, 2024
1 parent 1f59ace commit d0e1ffe
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 20 deletions.
4 changes: 2 additions & 2 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ samples = glob_wildcards(config["hic_path"] + samples_in_pattern).sample
# set {diploid_mode} global variable - used to run hifiasm_het rather than hifiasm
diploid_mode=config["hifiasm"]["optional_params"]["--h1"] and config["hifiasm"]["optional_params"]["--h2"]

# Include the common rule, where the inputs for rule_all are defined
include: "rules/common.smk"
# Include the hifi_prep rule
include: "rules/hifi_prep.smk"
# Include the nanoplot
Expand Down Expand Up @@ -45,8 +47,6 @@ include: "rules/two_read_bam_combiner.smk"
include: "rules/picard.smk"
# Include the yahs rule
include: "rules/yahs.smk"
# Include the common rule, where the inputs for rule_all are defined
include: "rules/common.smk"


# Define the rule all, which is the default rule that Snakemake runs when no specific rule or target is specified
Expand Down
3 changes: 0 additions & 3 deletions workflow/rules/bwa_index.smk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# colora doesn't contain the codes to handle technical and biological replicates of hic reads, refer to the original pipeline for that


# include common.smk to use wildcards
include: "common.smk"

rule bwa_index:
input:
get_bwa_index_inputs
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_all_inputs(wc=None):
)) # final scaffolded assembly

# If not in diploid mode, add asm.alternate.fa as an input
if not diploid_mode:
if not diploid_mode and config["include_purge_dups"] == True:
inputs.append("results/purge_dups_alt/asm.alternate_purged.fa")

return inputs
Expand Down
4 changes: 0 additions & 4 deletions workflow/rules/oatk.smk
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# This rule runs oatk to extract organelles reads from the hifi reads.

# include common.smk to use get_oatk_outputs function
# get_oatk_outputs is used to dynamically decide the outputs of oatk
include: "common.smk"


rule oatk:
input:
Expand Down
5 changes: 0 additions & 5 deletions workflow/rules/purge_dups.smk
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# This rule uses purge_dups purge haplotigs and overlaps from the primary assembly produced by hifiasm


# include common.smk to use get_purge_dups_inputs
include: "common.smk"


rule purge_dups:
input:
reads="results/reads/hifi/hifi.fastq.gz",
Expand Down
5 changes: 0 additions & 5 deletions workflow/rules/yahs.smk
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

import glob


# include common.smk to use get_bwa_index_inputs
include: "common.smk"


rule yahs:
input:
REF="results/bwa_index_{hap}/asm.fa",
Expand Down

0 comments on commit d0e1ffe

Please sign in to comment.