Skip to content

Commit

Permalink
fix: replace 3' specific cutadapt rules with a specific cutadapt setu…
Browse files Browse the repository at this point in the history
…p in the config.yaml for the 3' test
  • Loading branch information
dlaehnemann committed Aug 17, 2023
1 parent e21ddbc commit 8e8a290
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 107 deletions.
11 changes: 7 additions & 4 deletions .test/3-prime-config/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ params:
# the reverse reads of paired end sequencing:
# * https://cutadapt.readthedocs.io/en/stable/guide.html#trimming-paired-end-reads
cutadapt-se:
adapters: "-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC"
extra: "-q 20"
# This setup is for Lexogen QuantSeq FWD data, based on (but simplfied):
# https://faqs.lexogen.com/faq/what-is-the-adapter-sequence-i-need-to-use-for-t-1
# For more details, see the QuantSeq section in the `config/README.md` file.
adapters: "-a r1adapter=AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC;min_overlap=7;max_error_rate=0.005"
extra: "--minimum-length 33 --nextseq-trim=20 --poly-a"
# reasoning behind parameters:
# For reads that are produced by 3’-end sequencing, depending on the protocol, it might be recommended to remove some leading bases (e.g. see https://www.nature.com/articles/s41598-019-55434-x#Sec10)
# * `--minimum-length 33`:
Expand All @@ -134,5 +137,5 @@ params:
# * `--minimum-overlap 7`: the cutadapt default minimum overlap of `5` did trimming on the level
# of expected adapter matches by chance
cutadapt-pe:
adapters: "-a ACGGATCGATCGATCGATCGAT -g GGATCGATCGATCGATCGAT -A ACGGATCGATCGATCGATCGAT -G GGATCGATCGATCGATCGAT"
extra: "--minimum-length 33 -e 0.005 --overlap 7"
adapters: ""
extra: ""
40 changes: 25 additions & 15 deletions workflow/rules/trim.smk
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,29 @@ rule cutadapt_pe:
"v1.22.0/bio/cutadapt/pe"


if not is_3prime_experiment:
rule cutadapt:
input:
get_fastqs,
output:
fastq="results/trimmed/{sample}-{unit}.fastq.gz",
qc="results/trimmed/{sample}-{unit}.qc.txt",
threads: 8
params:
adapters=config["params"]["cutadapt-se"]["adapters"],
extra=config["params"]["cutadapt-se"]["extra"],
log:
"results/logs/cutadapt/{sample}-{unit}.log",
wrapper:
"v1.22.0/bio/cutadapt/se"

rule cutadapt:
input:
get_fastqs,
output:
fastq="results/trimmed/{sample}-{unit}.fastq.gz",
qc="results/trimmed/{sample}-{unit}.qc.txt",
threads: 8
params:
adapters=config["params"]["cutadapt-se"]["adapters"],
extra=config["params"]["cutadapt-se"]["extra"],
log:
"results/logs/cutadapt/{sample}-{unit}.log",
wrapper:
"v1.22.0/bio/cutadapt/se"
rule max_read_length:
input:
get_all_fastqs,
output:
"results/stats/max-read-length.json",
log:
"logs/max-read-length.log",
conda:
"../envs/pysam.yaml"
script:
"../scripts/get-max-read-length.py"
88 changes: 0 additions & 88 deletions workflow/rules/trim_3prime.smk

This file was deleted.

0 comments on commit 8e8a290

Please sign in to comment.