Snakefile_modules.smk 1.45 KB
Newer Older
jacqueslagnel's avatar
jacqueslagnel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# WGS Snakemake pipeline for Paired-end Illumina sequencing using a Reference genome
# Pipeline features:
# 1) read preprocessing,
# 2) reads QC,
# 3) mapping with bwa,
# 4) mapping QC
# 5) SNPs calling using freebayes
#
# Snakemake features: fastq from csv file, config, modules, SLURM
# feature: fastq from csv file, modules, SLURM, report

import pandas as pd
from snakemake.utils import min_version
# snakemake built-in report function requires min version 5.1
min_version("5.1.0")


#read the sample file using pandas lib (sample names+ fastq names) and crezate index using the sample name
samples = pd.read_csv(config["samplesfile"], sep='\t', dtype=str, comment='#').set_index(["SampleName"], drop=False)

cwd = os.getcwd() + "/"

# modules loading...
include : cwd + "smkmodules/modules/utils.smk"
include : cwd + "smkmodules/modules/PREPROC_fastp_pe.smk"
include : cwd + "smkmodules/modules/QC_fastqc_pe.smk"
include : cwd + "smkmodules/modules/QC_multiqc_fastqc.smk"
include : cwd + "smkmodules/modules/MAPPING_bwa_pe.smk"
include : cwd + "smkmodules/modules/QC_multiqc_bam.smk"
include : cwd + "smkmodules/modules/SNP_freebayes.smk"

rule final_outs:
    input:
        "{outdir}/multiqc/multiqc_report_fastqc.html".format(outdir=config["outdir"]),
        "{outdir}/multiqc/multiqc_report_bam.html".format(outdir=config["outdir"]),
        expand("{outdir}/variant/{sample}_varscan.vcf".format(outdir=config["outdir"])", outdir=config["outdir"], sample=samples['SampleName'])