From d0e5cf57459ffccdc190e5733a9505bc35bcbb4b Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Wed, 26 Jun 2024 10:37:29 +0000 Subject: [PATCH] Paired end parameter + fixing samtools index issue --- config/config.yaml | 2 ++ workflow/rules/common.smk | 7 ++++++- workflow/rules/utils.smk | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/config/config.yaml b/config/config.yaml index 6a25bcb9..846efcac 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -46,6 +46,8 @@ MultiQC: False # Enable or disable ashleys-qc automatic classification bypass_ashleys: False +paired_end: True + # -------------------------------------------------------- # Other modules # -------------------------------------------------------- diff --git a/workflow/rules/common.smk b/workflow/rules/common.smk index d85be96c..ca1ebb34 100644 --- a/workflow/rules/common.smk +++ b/workflow/rules/common.smk @@ -20,6 +20,11 @@ conda_envs += ( else [] ) +if config["paired_end"] is True: + pair = ["1", "2"] +else: + pair = ["1"] + # print(config["data_location"]) if config["ashleys_pipeline"] is True and config["genecore"] is True: @@ -284,7 +289,7 @@ class HandleInput: regex_element=d_master[sample]["index_pattern"], index=d_master[sample]["indexes"], cell_nb=[str(e).zfill(2) for e in list(range(1, 97))], - pair=["1", "2"], + pair=pair, ) for sample in d_master if sample in samples_to_process diff --git a/workflow/rules/utils.smk b/workflow/rules/utils.smk index 6f2f270d..ed94a3d1 100644 --- a/workflow/rules/utils.smk +++ b/workflow/rules/utils.smk @@ -126,6 +126,21 @@ rule index_merged_strandphaser_vcf: "tabix -p vcf {input.vcf} > {log} 2>&1" +rule gunzip_fasta: + input: + ancient("{file}.fa.gz"), + output: + "{file}.fa", + log: + "{file}.log", + conda: + "../envs/mc_bioinfo_tools.yaml" + resources: + mem_mb=get_mem_mb_heavy, + shell: + "gunzip -cd {input} > {output}" + + rule samtools_faindex: input: ancient("{file}.fa"),