From ca850dbd567cc1f7dd81396571c811ceae4bd146 Mon Sep 17 00:00:00 2001 From: LiaOb21 Date: Tue, 27 Feb 2024 21:41:46 +0000 Subject: [PATCH] adjusting with common --- workflow/rules/bwa_index.smk | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/workflow/rules/bwa_index.smk b/workflow/rules/bwa_index.smk index 3e6ab2e..4e03ee9 100644 --- a/workflow/rules/bwa_index.smk +++ b/workflow/rules/bwa_index.smk @@ -3,29 +3,8 @@ # For more info: https://github.com/ArimaGenomics/mapping_pipeline # colora doesn't contain the codes to handle technical and biological replicates of hic reads, refer to the original pipeline for that - -# create a function to read the inputs of bwa_index rule dynamically -def get_bwa_index_inputs(): - if config["include_purge_dups"] == 'True': - return "results/purge_dups/hifiasm_p_purged.fa" - else: - return "results/hifiasm/hifiasm.asm.p_ctg.fa" - - -# create a function to read the outputs of bwa_index rule dynamically -def get_bwa_index_outputs(): - if config["include_purge_dups"] == 'True': - return ["results/purge_dups/hifiasm_p_purged.fa.amb", - "results/purge_dups/hifiasm_p_purged.fa.ann", - "results/purge_dups/hifiasm_p_purged.fa.bwt", - "results/purge_dups/hifiasm_p_purged.fa.pac", - "results/purge_dups/hifiasm_p_purged.fa.sa"] - else: - return ["results/hifiasm/hifiasm.asm.p_ctg.fa.amb", - "results/hifiasm/hifiasm.asm.p_ctg.fa.ann", - "results/hifiasm/hifiasm.asm.p_ctg.fa.bwt", - "results/hifiasm/hifiasm.asm.p_ctg.fa.pac", - "results/hifiasm/hifiasm.asm.p_ctg.fa.sa"] +# include common.smk to use get_bwa_index_inputs and get_bwa_index_outputs functions +include: "common.smk" rule bwa_index: input: