Skip to content
Snippets Groups Projects
Commit 33a80bfa authored by seehagec01's avatar seehagec01
Browse files

fix#1

parent 86498c5b
No related branches found
No related tags found
No related merge requests found
---
index: "results/reference/index"
samples: "resources/samples.tsv"
samples: "resources/sample/samples.tsv"
bowtieparams: "-q"
......@@ -10,3 +10,5 @@ bowtie:
N: 0 # Sets the number of mismatches to allowed in a seed alignment during multiseed alignment.
L: 22 # Sets the length of the seed substrings to align during multiseed alignment.
extra: "--ignore-quals --end-to-end" # users can put here all other parameters or simply leave empty
adapter: "resources/adapter/TruSeq3-PE.fa"
>PrefixPE/1
TACACTCTTTCCCTACACGACGCTCTTCCGATCT
>PrefixPE/2
GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT
sample fq1 fq2
ERR024604 results/fastq/ERR024604_1.fastq.gz results/fastq/ERR024604_2.fastq.gz
ERR024605 results/fastq/ERR024605_1.fastq.gz results/fastq/ERR024605_2.fastq.gz
ERR024606 results/fastq/ERR024606_1.fastq.gz results/fastq/ERR024606_2.fastq.gz
ERR024607 results/fastq/ERR024607_1.fastq.gz results/fastq/ERR024607_2.fastq.gz
ERR024608 results/fastq/ERR024608_1.fastq.gz results/fastq/ERR024608_2.fastq.gz
ERR024609 results/fastq/ERR024609_1.fastq.gz results/fastq/ERR024609_2.fastq.gz
......@@ -6,6 +6,10 @@ samples = pd.read_table(config["samples"], index_col="sample")
rule all:
input:
expand("results/trimmed/{sample}_forward_paired.fq.gz", sample=samples.index),
expand("results/trimmed/{sample}_forward_unpaired.fq.gz", sample=samples.index),
expand("results/trimmed/{sample}_reverse_paired.fq.gz", sample=samples.index),
expand("results/trimmed/{sample}_reverse_unpaired.fq.gz", sample=samples.index),
"results/aggregate/mappedcounts.csv",
expand("results/stats/{sample}.stats.txt", sample=samples.index),
expand("results/fastqc/{sample}_1_fastqc.html", sample=samples.index),
......@@ -20,3 +24,5 @@ include:"rules/bowtie.smk"
include:"rules/samtools.smk"
include:"rules/aggregate.smk"
include:"rules/trimming.smk"
......@@ -3,6 +3,7 @@ channels:
- bioconda
- defaults
dependencies:
- pandas=1.3.5
- bowtie2=2.3.5.1=py37h2dec4b4_0
- c-ares=1.18.1=hca72f7f_0
- ca-certificates=2022.2.1=hecd8cb5_0
......@@ -22,10 +23,10 @@ dependencies:
- pip=21.2.2=py37hecd8cb5_0
- python=3.7.11=h88f2d9e_0
- readline=8.1.2=hca72f7f_1
- samtools=1.4.1=0
- samtools=1.3.1=0
- setuptools=58.0.4=py37hecd8cb5_0
- sqlite=3.37.2=h707629a_0
- tbb=2021.5.0=haf03e11_0
- tbb=2020.2
- tk=8.6.11=h7bc2e8c_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.5=h1de35cc_0
......
......@@ -16,8 +16,8 @@ rule refindex:
rule map:
input:
"results/reference/index.bt2",
r1 = lambda wildcards: samples.at[wildcards.sample,'fq1'] if wildcards.sample in samples.index else ' ',
r2 = lambda wildcards: samples.at[wildcards.sample,'fq2'] if wildcards.sample in samples.index else ' '
"results/trimmed/{sample}_forward_paired.fq.gz",
"results/trimmed/{sample}_reverse_paired.fq.gz"
params:
prefix=config["index"],
bowtieparams=config["bowtieparams"]
......
......@@ -42,8 +42,7 @@ rule stats:
"results/bam_sorted/{sample}.bam.bai"
output:
"results/stats/{sample}.stats.txt"
threads:4
conda:
"../envs/yourenv.yaml"
shell:
"samtools idxstats --threads={threads} {input[0]} > {output}"
"samtools idxstats {input[0]} > {output}"
......@@ -2,7 +2,16 @@ rule trimming:
input:
rt1 = lambda wildcards: samples.at[wildcards.sample,'fq1'] if wildcards.sample in samples.index else ' ',
rt2 = lambda wildcards: samples.at[wildcards.sample,'fq2'] if wildcards.sample in samples.index else ' '
params:
adapter=config["adapter"]
output:
"results/trimmed/{sample}.fq.gz"
"results/trimmed/{sample}_forward_paired.fq.gz",
"results/trimmed/{sample}_forward_unpaired.fq.gz",
"results/trimmed/{sample}_reverse_paired.fq.gz",
"results/trimmed/{sample}_reverse_unpaired.fq.gz"
conda:
"../envs/yourenv.yaml"
log:
"workflow/report/trimming/{sample}.log"
shell:
"java -jar trimmomatic-0.39.jar PE {input[0]} {input[1]} {output} ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True LEADING:3 TRAILING:3 MINLEN:36"
"trimmomatic PE {input[0]} {input[1]} {output} ILLUMINACLIP:{params.adapter}:2:30:10:2:True LEADING:3 TRAILING:3 MINLEN:36"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment