Commit 05af94f6 authored by jacqueslagnel's avatar jacqueslagnel
Browse files

minor

parent 32775673
__author__ = "INRAE GAFL"
__license__ = "MIT"
__copyright__ = "INRAE, GAFL 2020"
# WGS Snakemake pipeline for Paired-end Illumina sequencing using a Reference genome
# Pipeline features:
# 1) read preprocessing,
......@@ -177,6 +181,12 @@ rule multiqc_bam:
singularity exec {params.bind} {params.multiqc_bin} multiqc --filename {output} {input}
"""
__author__ = "INRAE GAFL"
__license__ = "MIT"
__copyright__ = "INRAE, GAFL 2020"
#mapping with bwa PE mode
#reference indexing
#example with and without mark duplicate
......@@ -262,30 +272,30 @@ rule bam_stats:
singularity exec {params.bind} {params.samtools_bin} samtools stats -@ 2 {input.bam} > {output.stats}
"""
# SNP caller
#freebayes rule
rule freebayes:
input:
bam = "{outdir}/mapped/{{sample}}_sorted_parsed.bam".format(outdir=config["outdir"])
bam = "{outdir}/mapped/{{sample}}_sorted.bam".format(outdir=config["outdir"])
#on merged bams
#bam = "{outdir}/bams_merged_sorted.bam".format(outdir=config["outdir"])
output:
var = "{outdir}/variant/{{sample}}_varscan.vcf".format(outdir=config["outdir"])
var = "{outdir}/variant/{{sample}}_freebayes.vcf".format(outdir=config["outdir"])
#on merged bams
#var = "{outdir}/variant/SNPs4all_freebayes.vcf".format(outdir=config["outdir"])
params:
ref = config["REFPATH"] + "/" + config["GENOME"],
bind = config["BIND"],
samtools_bin = config["samtools_bin"],
varscan_bin = config["varscan_bin"],
freebayes_bin = config["freebayes_bin"]
message: "Looking for SNP in {input.bam} with Varscan \n"
message: "SNPs calling in {input.bam} using freebayes \n"
shell:
"""
zero=$(singularity exec {params.bind} {params.samtools_bin} samtools flagstat {input.bam}|head -n1|sed 's/\s.*//g')
if [ "$zero" -lt "1" ]
then
echo "WARNING ALLMINE {output.var} EMPTY"
echo "WARNING {output.var} EMPTY"
touch {output.var}
exit 0
fi
......@@ -300,3 +310,4 @@ rule freebayes:
exit 0
"""
__author__ = "INRAE GAFL"
__license__ = "MIT"
__copyright__ = "INRAE, GAFL 2020"
# WGS Snakemake pipeline for Paired-end Illumina sequencing using a Reference genome
# Pipeline features:
# 1) read preprocessing,
......
......@@ -3,7 +3,7 @@
samplesfile : "samples.csv"
fq_dir : "/nosave/project/gafl/Data/Rosaceae/Prunus_persica/RNA/RNAseq/PeachRNAseq/raw"
fq_dir : "/nosave/project/gafl/Data/Rosaceae/Prunus_persica/DNA/WGS/PeachReSeq/raw"
outdir : "/work/project/gafl/ReDD/testwgs"
GENOME : "Prunus_persica_v2.0.a1_scaffolds.fasta"
REFPATH : "/work/project/gafl/ReDD/testwgs/refgenome"
......
Markdown is supported
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