From 60e0c3b91864a78811bf41856adc0e26b92ec053 Mon Sep 17 00:00:00 2001 From: dpryan79 Date: Wed, 25 Jul 2018 14:15:42 +0200 Subject: [PATCH] Fix peak QC awk command in ChIP and ATAC workflows --- conda-recipe/meta.yaml | 2 +- snakePipes/__init__.py | 2 +- snakePipes/shared/rules/ATAC_qc.snakefile | 4 ++-- snakePipes/shared/rules/MACS2.snakefile | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 1bddc5478..6831d9a49 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: snakepipes - version: 1.0.0_alpha4 + version: 1.0.0_alpha5 source: path: ../ diff --git a/snakePipes/__init__.py b/snakePipes/__init__.py index 622dad706..76ba7a380 100644 --- a/snakePipes/__init__.py +++ b/snakePipes/__init__.py @@ -1 +1 @@ -__version__ = '1.0.0-a4' +__version__ = '1.0.0-a5' diff --git a/snakePipes/shared/rules/ATAC_qc.snakefile b/snakePipes/shared/rules/ATAC_qc.snakefile index 9702ccfca..d8f03adda 100644 --- a/snakePipes/shared/rules/ATAC_qc.snakefile +++ b/snakePipes/shared/rules/ATAC_qc.snakefile @@ -79,8 +79,8 @@ rule MACS2_peak_qc: frip=`bc -l <<< "$reads_in_peaks/$mapped_reads"` # compute peak genome coverage - peak_len=`awk '{{total=$3-$2}}END{{print total}}' {params.peaks}` - genome_size=`awk '{{total=$3-$2}}END{{print total}}' {params.peaks}` + peak_len=`awk '{{total+=$3-$2}}END{{print total}}' {params.peaks}` + genome_size=`awk '{{total+=$3-$2}}END{{print total}}' {params.peaks}` genomecov=`bc -l <<< "$peak_len/$genome_size"` # write peak-based QC metrics to output file diff --git a/snakePipes/shared/rules/MACS2.snakefile b/snakePipes/shared/rules/MACS2.snakefile index ccd918a73..443e959c0 100644 --- a/snakePipes/shared/rules/MACS2.snakefile +++ b/snakePipes/shared/rules/MACS2.snakefile @@ -114,8 +114,8 @@ rule MACS2_peak_qc: frip=`bc -l <<< "$reads_in_peaks/$mapped_reads"` # compute peak genome coverage - peak_len=`awk '{{total=$3-$2}}END{{print total}}' {params.peaks}` - genome_size=`awk '{{total=$3-$2}}END{{print total}}' {params.peaks}` + peak_len=`awk '{{total+=$3-$2}}END{{print total}}' {params.peaks}` + genome_size=`awk '{{total+=$3-$2}}END{{print total}}' {params.peaks}` genomecov=`bc -l <<< "$peak_len/$genome_size"` # write peak-based QC metrics to output file