Skip to content
Snippets Groups Projects
Commit 1dd9357b authored by seehagec01's avatar seehagec01
Browse files

fastp rule

parent 984deffa
Branches
No related tags found
No related merge requests found
sample fq1 fq2
ERR4082859 Data/SARS-Cov-2/ERR4082859_1.fastq.gz Data/SARS-Cov-2/ERR4082859_2.fastq.gz
ERR4082860 Data/SARS-Cov-2/ERR4082860_1.fastq.gz Data/SARS-Cov-2/ERR4082860_2.fastq.gz
ERR4082863 Data/SARS-Cov-2/ERR4082863_1.fastq.gz Data/SARS-Cov-2/ERR4082863_2.fastq.gz
ERR4181709 Data/SARS-Cov-2/ERR4181709_1.fastq.gz Data/SARS-Cov-2/ERR4181709_2.fastq.gz
ERR4181711 Data/SARS-Cov-2/ERR4181711_1.fastq.gz Data/SARS-Cov-2/ERR4181711_2.fastq.gz
ERR4181713 Data/SARS-Cov-2/ERR4181713_1.fastq.gz Data/SARS-Cov-2/ERR4181713_2.fastq.gz
\ No newline at end of file
name: yourenv.yaml
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
- certifi=2021.10.8=py37hecd8cb5_2
- curl=7.80.0=hca72f7f_0
- fastqc=0.11.9
- krb5=1.19.2=hcd88c3b_0
- libcurl=7.80.0=h6dfd666_0
- libcxx=12.0.0=h2f01273_0
- libedit=3.1.20210910=hca72f7f_0
- libev=4.33=h9ed2024_1
- libffi=3.3=hb1e8313_2
- libnghttp2=1.46.0=ha29bfda_0
- libssh2=1.9.0=ha12b0ac_1
- multiqc=1.12
- ncurses=6.3=hca72f7f_2
- openssl=1.1.1m=hca72f7f_0
- perl=5.26.2=h4e221da_0
- pip=21.2.2=py37hecd8cb5_0
- python=3.7.11=h88f2d9e_0
- qualimap=2.2.2a
- readline=8.1.2=hca72f7f_1
- samtools=1.3.1=0
- setuptools=58.0.4=py37hecd8cb5_0
- sqlite=3.37.2=h707629a_0
- tbb=2020.2
- tk=8.6.11=h7bc2e8c_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.5=h1de35cc_0
- zlib=1.2.11=h4dc903c_4
prefix: /buffer/ag_bsc/pmsb_workflows_2022/virus/swp-workflows/project/workflow/envs/yourenv.yaml
name: yourenv.yaml
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
- certifi=2021.10.8=py37hecd8cb5_2
- curl=7.80.0=hca72f7f_0
- fastqc=0.11.9
- krb5=1.19.2=hcd88c3b_0
- libcurl=7.80.0=h6dfd666_0
- libcxx=12.0.0=h2f01273_0
- libedit=3.1.20210910=hca72f7f_0
- libev=4.33=h9ed2024_1
- libffi=3.3=hb1e8313_2
- libnghttp2=1.46.0=ha29bfda_0
- libssh2=1.9.0=ha12b0ac_1
- multiqc=1.12
- ncurses=6.3=hca72f7f_2
- openssl=1.1.1m=hca72f7f_0
- perl=5.26.2=h4e221da_0
- pip=21.2.2=py37hecd8cb5_0
- python=3.7.11=h88f2d9e_0
- qualimap=2.2.2a
- readline=8.1.2=hca72f7f_1
- samtools=1.3.1=0
- setuptools=58.0.4=py37hecd8cb5_0
- sqlite=3.37.2=h707629a_0
- tbb=2020.2
- tk=8.6.11=h7bc2e8c_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.5=h1de35cc_0
- zlib=1.2.11=h4dc903c_4
prefix: /buffer/ag_bsc/pmsb_workflows_2022/virus/swp-workflows/project/workflow/envs/yourenv.yaml
name: yourenv.yaml
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
- certifi=2021.10.8=py37hecd8cb5_2
- curl=7.80.0=hca72f7f_0
- fastqc=0.11.9
- krb5=1.19.2=hcd88c3b_0
- libcurl=7.80.0=h6dfd666_0
- libcxx=12.0.0=h2f01273_0
- libedit=3.1.20210910=hca72f7f_0
- libev=4.33=h9ed2024_1
- libffi=3.3=hb1e8313_2
- libnghttp2=1.46.0=ha29bfda_0
- libssh2=1.9.0=ha12b0ac_1
- multiqc=1.12
- ncurses=6.3=hca72f7f_2
- openssl=1.1.1m=hca72f7f_0
- perl=5.26.2=h4e221da_0
- pip=21.2.2=py37hecd8cb5_0
- python=3.7.11=h88f2d9e_0
- qualimap=2.2.2a
- readline=8.1.2=hca72f7f_1
- samtools=1.3.1=0
- setuptools=58.0.4=py37hecd8cb5_0
- sqlite=3.37.2=h707629a_0
- tbb=2020.2
- tk=8.6.11=h7bc2e8c_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.5=h1de35cc_0
- zlib=1.2.11=h4dc903c_4
prefix: /buffer/ag_bsc/pmsb_workflows_2022/virus/swp-workflows/project/workflow/envs/yourenv.yaml
map_dict = {'1':'fq1', '2':'fq2'}
rule fastp:
input:
rf1 = lambda wildcards: samples.at[wildcards.sample,map_dict[wildcards.i]] if wildcards.sample in samples.index else ' '
rf2 = lambda wildcards: samples.at[wildcards.sample,map_dict[wildcards.i]] if wildcards.sample in samples.index else ' '
output:
trimmed=["trimmed/{sample}.1.fastq", "trimmed/{sample}.2.fastq"],
# Unpaired reads separately
unpaired1="trimmed/{sample}.u1.fastq",
unpaired2="trimmed/{sample}.u2.fastq",
# or in a single file
# unpaired="trimmed/{sample}.singletons.fastq",
merged="trimmed/{sample}.merged.fastq",
failed="trimmed/{sample}.failed.fastq",
html="report/{sample}.html",
json="report/{sample}.json"
log:
"logs/fastp/{sample}.log"
conda:
"../envs/yourenv.yaml"
params:
# adapters="--adapter_sequence ACGGCTAGCTA --adapter_sequence_r2 AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC",
extra="--merge"
threads: 4
wrapper:
"v1.3.2/bio/fastp"
\ No newline at end of file
import pandas as pd
configfile: "config/config.yaml"
samples = pd.read_table(config["samples"], index_col="sample")
rule all:
input: "results/fastp/{sample}.1.fastq"
include: "rules/fastp.smk"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment