From 3593e6c0ac8f15bef8fb3f5f4619225ae954e4aa Mon Sep 17 00:00:00 2001 From: alihamraoui Date: Tue, 7 Jan 2025 10:38:08 +0100 Subject: [PATCH 1/3] FIX: Resolve BadRead call issues --- Snakefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Snakefile b/Snakefile index ce1ecc4..cbd8de3 100644 --- a/Snakefile +++ b/Snakefile @@ -82,7 +82,7 @@ def get_model_details(mtype, name): elif mtype == "Seq": # Inputs / Build params assert set(model_dict.keys()) <= {"sample", "params"} - paf = get_sample_paf(sample, "badread.cDNA") + paf = get_badread_paf(sample, "badread.cDNA") params_build.append(f"--alignment {paf}") inputs.append(paf) fastqs = get_sample_fastqs(sample) @@ -172,6 +172,9 @@ def get_sample_ref(sample, ref_type): def get_sample_paf(sample, ref_type): return f"{preproc_d}/minimap2/{sample}.{ref_type}.paf" +def get_badread_paf(sample, ref_type): + return f"{preproc_d}/minimap2/{sample}.{ref_type}.paf.gz" + def get_barcode_whitelist(name): return config["refs"]["barcodes"][name] @@ -541,9 +544,9 @@ rule model_sequence: params: model=lambda wc: models["Seq", wc.model_name].params_build, shell: - "badread qscore_model {params.model} > {output.error_model}" + "badread error_model {params.model} > {output.error_model}" " && " - "badread error_model {params.model} > {output.qscore_model}" + "badread qscore_model {params.model} > {output.qscore_model}" ### Preprocessing rules ### @@ -611,16 +614,15 @@ rule minimap_cdna_for_badread_models: reads=lambda wc: get_sample_fastqs(wc.sample), ref=lambda wc: get_sample_ref(wc.sample, "cDNA"), output: - paf=f"{preproc_d}/badread/{{sample}}.badread.cDNA.paf", + paf=f"{preproc_d}/minimap2/{{sample}}.badread.cDNA.paf.gz", threads: 32 shell: "minimap2" " -t {threads}" " -x map-ont" " -c" - " -o {output.paf}" " {input.ref}" - " {input.reads}" + " {input.reads} | gzip > {output.paf}" rule cat_refs: @@ -636,4 +638,4 @@ rule cat_refs: if ref.endswith(".gz"): shell("zcat {ref} >> {output.ref}") else: - shell("cat {ref} >> {output.ref}") + shell("cat {ref} >> {output.ref}") \ No newline at end of file From 0fd79ebd2544023fdd79aa79dc14fc6b2fd84b1d Mon Sep 17 00:00:00 2001 From: alihamraoui Date: Tue, 7 Jan 2025 10:42:00 +0100 Subject: [PATCH 2/3] FIX: Use --lr-br instead of --lr-bc for long-read barcode list --- Snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snakefile b/Snakefile index cbd8de3..a84e343 100644 --- a/Snakefile +++ b/Snakefile @@ -62,7 +62,7 @@ def get_model_details(mtype, name): inputs.append(cb_txt) if "lr-bc" in model_dict: lr_matches_tsv = f"{preproc_d}/scTagger/{sample}/{sample}.lr_matches.tsv.gz" - params_build.append(f"--lr-bc {lr_matches_tsv}") + params_build.append(f"--lr-br {lr_matches_tsv}") inputs.append(lr_matches_tsv) # Outputs / Run params params_run.append(f"-a {Xpr_tsv}") From 72de8cf3b96b05e4d2b3e955870281efec790432 Mon Sep 17 00:00:00 2001 From: Ali Hamraoui Date: Tue, 7 Jan 2025 15:08:05 +0100 Subject: [PATCH 3/3] FIX: test config.yaml --- config.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config.yaml b/config.yaml index 7d287e9..f6e34c3 100644 --- a/config.yaml +++ b/config.yaml @@ -38,7 +38,7 @@ TS_experiments: params: "" model: "N1" - plA: - params: "" + params: "--normal=15,7.5" head_2: pipeline: - Tsb: @@ -48,7 +48,7 @@ TS_experiments: params: "" model: "N1" - plA: - params: "" + params: "--normal=15,7.5" - SCB: params: "" - Tag: @@ -65,7 +65,7 @@ TS_experiments: - Flp: params: "-p 0.5" - Seq: - params: "--skip-qual-compute --badread-model nanopore2020" + params: "--skip-qual-compute --badread-error-model nanopore2023" exec: tksm: build/bin/tksm @@ -81,6 +81,7 @@ refs: GTF: data/refs/Homo_sapiens.GRCh38.108.chr21.gtf barcodes: 10x: data/refs/3M-february-2018.txt.gz + 10x: data/refs/3M-february-2018.txt.gz samples: "MCF7-sgnex": @@ -104,4 +105,4 @@ models: N1_cb-gen: sample: N1 cb-txt: 10x - params: "--cb-count 500" + params: "--cb-count 500" \ No newline at end of file