Commit 52ffe199 authored by JihedC's avatar JihedC
Browse files

added bamcoverage

parent 76b562b4
......@@ -92,7 +92,7 @@ FASTP = expand(WORKING_DIR + "trimmed/" + "{sample}_{read}_tri
BOWTIE2 = expand(WORKING_DIR + "mapped/{sample}.bam", sample= SAMPLES)
FASTQC = expand(RESULT_DIR + "fastqc/{sample}.fastqc.html", sample=SAMPLES)
BIGWIG = expand(RESULT_DIR + "bigwig/{sample}_rpkm.bw", sample=SAMPLES)
MACS2 = expand(RESULT_DIR + "macs2/{treatment}_vs_{control}_peaks.narrowPeak", treatment = CASES, control = CONTROLS)
###############
# Final output
......@@ -102,10 +102,16 @@ rule all:
FASTP,
FASTQC,
BOWTIE2,
BIGWIG
BIGWIG,
MACS2
message: "ChIP-seq SE pipeline succesfully run." #finger crossed to see this message!
shell:"#rm -rf {WORKING_DIR}"
shell:"""
cp units.tsv RESULT_DIR
cp config.yaml RESULT_DIR
#rm -rf {WORKING_DIR}
"""
###############
# Rules
......@@ -113,6 +119,6 @@ rule all:
include : "rules/external_data.smk"
include : 'rules/pre_processing.smk'
#include : "rules/macs2_peak_calling.smk"
include : "rules/peak_calling.smk"
include : "rules/deeptools_post_processing.smk"
---
samples: sample.tsv
units: units.tsv
units: units_histone.tsv
# files and directories
#fastq_dir: "fastq/"
......@@ -45,3 +45,11 @@ bamcoverage:
normalizeUsing: 'RPKM'
effectiveGenomeSize: '2652783500' #https://deeptools.readthedocs.io/en/latest/content/feature/effectiveGenomeSize.html
smoothLength: '50'
#MACS2
macs2:
genomesize: "--gsize mm" #here I used 'mm' because it's the closest to tomato, for human change to 'hs'
format: "--format BAMPE" #Use BAMPE to activate the paired end data, MACS will use the actual insert size of pairs of reads to build the fragemnt pileup.
qvalue: "0.05" #default is 0.05
outdir : "results/bed/"
bandwidth: "--bw 350" #the bandwidth is used to scan the genome for model building. To be set to the expected sonication fragment size.
rule call_narrow_peaks:
input:
treatment = RESULT_DIR + "mapped/{treatment}.sorted.bam",
control = RESULT_DIR + "mapped/{control}.sorted.bam",
output:
RESULT_DIR + "macs2/{treatment}_vs_{control}_peaks.narrowPeak"
message:
"Calling narrowPeak for {wildcards.sample}"
params:
name = "{treatment}_vs_{control}", #this option will give the output name, has to be similar to the output
genomesize = str(config['macs2']['genomesize']),
qvalue = str(config['macs2']['qvalue'])
log:
RESULT_DIR + "logs/macs2/{treatment}_vs_{control}_peaks.narrowPeak.log"
shell:
"macs2 callpeak -t {input.treatment} -c {input.control} {params.genomesize} --name {params.name} -q {params.qvalue} --nomodel --outdir results/bed/ &>{log}"
sample fq1 fq2 condition
H3K9AcDN1rep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091645_T1.fastq.gz treatment
H3K9AcDN1rep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091645_T2.fastq.gz treatment
H3K9AcDN1rep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091646_T1.fastq.gz treatment
H3K9AcDN2arep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091647_T1.fastq.gz treatment
H3K9AcDN2brep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091648_T1.fastq.gz treatment
H3K9AcDN2brep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091648_T2.fastq.gz treatment
H3K9AcDN2brep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091649_T1.fastq.gz treatment
H3K9AcDN2brep4 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091649_T2.fastq.gz treatment
H3K9AcDN3rep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091650_T1.fastq.gz treatment
H3K9AcDN3rep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091650_T2.fastq.gz treatment
H3K9AcDN3rep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091651_T1.fastq.gz treatment
H3K4me2DN1rep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091654_T1.fastq.gz treatment
H3K4me2DN1rep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091654_T2.fastq.gz treatment
H3K4me2DN1rep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091655_T1.fastq.gz treatment
H3K4me2DN2arep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091656_T1.fastq.gz treatment
H3K4me2DN2brep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091657_T1.fastq.gz treatment
H3K4me2DN2brep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091657_T2.fastq.gz treatment
H3K4me2DN2brep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091658_T1.fastq.gz treatment
H3K4me2DN2brep4 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091658_T2.fastq.gz treatment
H3K4me2DN3rep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091659_T1.fastq.gz treatment
H3K4me2DN3rep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091659_T2.fastq.gz treatment
H3K4me2DN3rep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091660_T1.fastq.gz treatment
H3K27me3DN1rep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091663_T1.fastq.gz treatment
H3K27me3DN1rep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091663_T2.fastq.gz treatment
H3K27me3DN1rep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091663_T3.fastq.gz treatment
H3K27me3DN1rep4 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091664_T1.fastq.gz treatment
H3K27me3DN1rep5 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091664_T2.fastq.gz treatment
H3K27me3DN2arep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091665_T1.fastq.gz treatment
H3K27me3DN2brep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091666_T1.fastq.gz treatment
H3K27me3DN2brep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091666_T2.fastq.gz treatment
H3K27me3DN2brep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091667_T1.fastq.gz treatment
H3K27me3DN2brep4 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091667_T2.fastq.gz treatment
H3K27me3DN2brep5 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091668_T1.fastq.gz treatment
H3K27me3DN2brep6 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091668_T2.fastq.gz treatment
H3K27me3DN3rep1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091668_T1.fastq.gz treatment
H3K27me3DN3rep2 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091668_T2.fastq.gz treatment
H3K27me3DN3rep3 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091668_T3.fastq.gz treatment
H3K27me3DN3rep4 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091669_T1.fastq.gz treatment
H3K27me3DN3rep5 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091669_T2.fastq.gz treatment
PU1DN1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091672_T1.fastq.gz treatment
PU1DN2a /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091673_T1.fastq.gz treatment
PU1DN2b /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091674_T1.fastq.gz treatment
GATADN1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091676_T1.fastq.gz treatment
GATADN2b /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091677_T1.fastq.gz treatment
inputDN1 /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091679_T1.fastq.gz control
inputDN2a /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091680_T1.fastq.gz control
inputDN2b /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091681_T1.fastq.gz control
inputDN3a /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091682_T1.fastq.gz control
inputDN3b /exports/humgen/jihed/Kernfeld_scRNA_thymus/nextflow/results/fastq/SRX091682_T2.fastq.gz control
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment