diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d120f4acad3c45bd81f897116ecd02c67a54efa..3484b67e49a0299c4c5c7d8c1f89a483cf58839a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file. - Add Nextflow to references.md - Fix pool_and_psuedoreplicate.py to run single experiment - Add test data +- Add PlotProfile Option +- Add Python version to MultiQC +- Add and Update tests ## [publish_1.0.6 ] - 2019-05-31 ### Added diff --git a/README.md b/README.md index 546d6ffa73cfbad5bfe01bc84a0316e2226e9cb0..ec8e8c7908178f3db77dfc753fec25b483d65a50 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,8 @@ diffPeaks | normcount_peaksets.txt | Use only for replicated samples; peak set v diffPeaks | pca.pdf | Use only for replicated samples; PCA of peak location and peak intensity diffPeaks | *_diffbind.bed | Use only for replicated samples; bed file of peak locations between replicates diffPeaks | *_diffbind.csv | Use only for replicated samples; CSV file of peaks between replicates +plotProfile | plotProfile.png | Plot profile of the TSS region +plotProfile | computeMatrix.gz | Compute Matrix from deeptools to create custom plots other than plotProfile ## Common Quality Control Metrics + These are the list of files that should be reviewed before continuing on with the CHIPseq experiment. If your experiment fails any of these metrics, you should pause and re-evaluate whether the data should remain in the study. diff --git a/docs/index.md b/docs/index.md index 08d678cb583a8cba25ef904188d53a5f389ebb6d..3b4a685cfc112291a221c04d7efa4fb85db9545a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -90,6 +90,8 @@ diffPeaks | normcount_peaksets.txt | Use only for replicated samples; peak set v diffPeaks | pca.pdf | Use only for replicated samples; PCA of peak location and peak intensity diffPeaks | *_diffbind.bed | Use only for replicated samples; bed file of peak locations between replicates diffPeaks | *_diffbind.csv | Use only for replicated samples; CSV file of peaks between replicates +plotProfile | plotProfile.png | Plot profile of the TSS region +plotProfile | computeMatrix.gz | Compute Matrix from deeptools to create custom plots other than plotProfile ## Common Quality Control Metrics + These are the list of files that should be reviewed before continuing on with the CHIPseq experiment. If your experiment fails any of these metrics, you should pause and re-evaluate whether the data should remain in the study. diff --git a/workflow/conf/biohpc.config b/workflow/conf/biohpc.config index c514d076c9628538f1e9ed0af484a42e9a56c5e4..7237cad47346ee0699fcadcf73dcd2a70f3431a5 100644 --- a/workflow/conf/biohpc.config +++ b/workflow/conf/biohpc.config @@ -78,21 +78,21 @@ params { genomesize = 'hs' chromsizes = '/project/shared/bicf_workflow_ref/GRCh38/genomefile.txt' fasta = '/project/shared/bicf_workflow_ref/GRCh38/genome.fa' - gta = '/project/shared/bicf_workflow_ref/GRCh38/gencode.gtf' + gtf = '/project/shared/bicf_workflow_ref/GRCh38/gencode.gtf' } 'GRCh37' { bwa = '/project/shared/bicf_workflow_ref/GRCh37' genomesize = 'hs' chromsizes = '/project/shared/bicf_workflow_ref/GRCh37/genomefile.txt' fasta = '/project/shared/bicf_workflow_ref/GRCh37/genome.fa' - gta = '/project/shared/bicf_workflow_ref/GRCh37/gencode.gtf' + gtf = '/project/shared/bicf_workflow_ref/GRCh37/gencode.gtf' } 'GRCm38' { bwa = '/project/shared/bicf_workflow_ref/GRCm38' genomesize = 'mm' chromsizes = '/project/shared/bicf_workflow_ref/GRCm38/genomefile.txt' fasta = '/project/shared/bicf_workflow_ref/GRCm38/genome.fa' - gta = '/project/shared/bicf_workflow_ref/GRCm38/gencode.gtf' + gtf = '/project/shared/bicf_workflow_ref/GRCm38/gencode.gtf' } } } diff --git a/workflow/main.nf b/workflow/main.nf index f392faa9114e2e2850b26230d2e1f38a3bfabecb..e239d4082ce31b6509d31c3e47353eaf7a35ffa6 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -28,7 +28,6 @@ params.skipMotif = false params.skipPlotProfile = false params.references = "$baseDir/../docs/references.md" params.multiqc = "$baseDir/conf/multiqc_config.yaml" -params.gtf = "/project/shared/bicf_workflow_ref/$params.genome/gencode.gtf" // Assign variables if astrocyte if (params.astrocyte) { @@ -37,6 +36,7 @@ if (params.astrocyte) { params.bwaIndex = "$referenceLocation/$params.genome" params.chromSizes = "$referenceLocation/$params.genome/genomefile.txt" params.fasta = "$referenceLocation/$params.genome/genome.fa" + params.gtf = "$referenceLocation/$params.genome/gencode.gtf" if (params.genome == 'GRCh37' || params.genome == 'GRCh38') { params.genomeSize = 'hs' } else if (params.genome == 'GRCm38') { @@ -47,6 +47,7 @@ if (params.astrocyte) { params.genomeSize = params.genome ? params.genomes[ params.genome ].genomesize ?: false : false params.chromSizes = params.genome ? params.genomes[ params.genome ].chromsizes ?: false : false params.fasta = params.genome ? params.genomes[ params.genome ].fasta ?: false : false + params.gtf = params.genome ? params.genomes[ params.genome ].fasta ?: false : false } @@ -463,13 +464,17 @@ peaksDesign = experimentPeaks //plotProfile process plotProfile { - publishDir "$outDir/${task.process}", mode: 'copy' + publishDir "$outDir/experimentQC", mode: 'copy' input: file ("*.pooled.fc_signal.bw") from bigwigs.collect() file gtf from gtfFile + output: + + file '*.{png,gz}' into plotProfile + when: !skipPlotProfile diff --git a/workflow/scripts/plotProfile.sh b/workflow/scripts/plotProfile.sh index 3ab4d901ee4a3c9da7cc1aa55c8215f831805f02..7f62dc5bdd9e13026315222b076b8b939f839d00 100644 --- a/workflow/scripts/plotProfile.sh +++ b/workflow/scripts/plotProfile.sh @@ -1,8 +1,8 @@ #!/bin/bash #plotProfile.sh -bws=`ls *.bw` -gtf=`ls *.gtf *.bed` +bws=$(ls *.bw) +gtf=$(ls *.gtf *.bed) computeMatrix reference-point \ --referencePoint TSS \ diff --git a/workflow/tests/test_plot_profile.py b/workflow/tests/test_plot_profile.py new file mode 100644 index 0000000000000000000000000000000000000000..6c9605d6d654f66adec865372223e13ddeaf6b19 --- /dev/null +++ b/workflow/tests/test_plot_profile.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import pytest +import os +import utils + +test_output_path = os.path.dirname(os.path.abspath(__file__)) + \ + '/../output/experimentQC/' + + +@pytest.mark.singleend +def test_plot_singleend(): + assert os.path.exists(os.path.join(test_output_path, 'plotProfile.png')) + + +@pytest.mark.pairedend +def test_plot_pairedend(): + assert os.path.exists(os.path.join(test_output_path, 'computeMatrix.gz'))