Skip to content

Commit

Permalink
adjusting with common
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaOb21 committed Feb 27, 2024
1 parent 3ddf849 commit ca850db
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions workflow/rules/bwa_index.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ca850db

Please sign in to comment.