Commit bd56726e authored by AntonieV's avatar AntonieV
Browse files

Changes according to PR#8

parent 90b21c30
`MA plot <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.plotMA>`_ **(FDR 0.05)** The `MA plot <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#ma-plot>`_ **(FDR 0.05)**
shows the log2 fold changes versus the mean of normalized counts from displays the log2 fold changes versus the mean of normalized counts of the
`DESeq2 <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf>`_ analysis filtered on a false DESeq2 analysis results.
discovery rate (FDR) threshold of 0.05 for pairwise comparisons of samples across the groups from a particular antibody. The results of this plot are filtered on a false discovery rate (FDR) threshold of 0.05 and represent the comparison of the
For more information about DESeq2 please see {{snakemake.wildcards["group_1"]}} versus {{snakemake.wildcards["group_2"]}} groups for the
{{snakemake.wildcards["antibody"]}} antibody. For more information about DESeq2 please see
`documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_. `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_.
**Volcano plot (FDR 0.05)** shows the significance (adjusted p-value) versus the log2 fold changes of the results of the **Volcano plot (FDR 0.05)** shows the significance (adjusted p-value) versus the log2 fold changes of the
`DESeq2 <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf>`_ analysis filtered on a false DESeq2 analysis results.
discovery rate (FDR) threshold of 0.05 for pairwise comparisons of samples across the groups from a particular antibody. The results of this plot are filtered on a false discovery rate (FDR) threshold of 0.05 and represent the comparison of the
For more information about DESeq2 please see {{snakemake.wildcards["group_1"]}} versus {{snakemake.wildcards["group_2"]}} groups for the
{{snakemake.wildcards["antibody"]}} antibody. For more information about DESeq2 please see
`documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_. `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_.
`Heatmap plot <https://cran.r-project.org/web/packages/pheatmap/pheatmap.pdf>`_ shows for each antibody a heatmap of `Heatmap plot <https://cran.r-project.org/web/packages/pheatmap/pheatmap.pdf>`_ shows a heatmap of the `rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or
the `rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or
`vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from `vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from
DESeq2 analysis. For more information about DESeq2 please see DESeq2 analysis for all groups treated with the {{snakemake.wildcards["antibody"]}} antibody
. For more information about DESeq2 please see
`documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_. `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_.
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
**(Principal Component Analysis)** describes variance of the **(Principal Component Analysis)** describes variance of the
`rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or `rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or
`vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from `vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from
DESeq2 analysis with regard to the antibody used. For more information about DESeq2 please see DESeq2 analysis with regard to the used {{snakemake.wildcards["antibody"]}} antibody. For more information about DESeq2 please see
`documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_. `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_.
Correlation `heatmap plots <https://cran.r-project.org/web/packages/pheatmap/pheatmap.pdf>`_ shows heatmaps of the Correlation `heatmap plots <https://cran.r-project.org/web/packages/pheatmap/pheatmap.pdf>`_ shows heatmaps of the
`rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or `rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or
`vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from `vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from
DESeq2 analysis for each pairwise comparison of samples across the groups from a particular antibody. For more information about DESeq2 please the DESeq2 analysis. The results of this plot represent the comparison of the
{{snakemake.wildcards["group_1"]}} versus {{snakemake.wildcards["group_2"]}} groups treated with the
{{snakemake.wildcards["antibody"]}} antibody. For more information about DESeq2 please
see `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_. see `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_.
**Scatter plots** uses the matrix of the **Scatter plots** uses the matrix of the
`rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or `rlog <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.rlog>`_ or
`vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from `vst <https://bioconductor.org/packages/release/bioc/manuals/DESeq2/man/DESeq2.pdf#Rfn.vst>`_ transformed counts from
DESeq2 analysis for pairwise comparisons of samples across the groups from a particular antibody. For more information about DESeq2 please see the DESeq2 analysis. The results of this plot represent the comparison of the
`documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_. {{snakemake.wildcards["group_1"]}} versus {{snakemake.wildcards["group_2"]}} groups treated with the
{{snakemake.wildcards["antibody"]}} antibody. For more information about DESeq2 please
see `documentation <https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html>`_.
**deepTools** `plotHeatmap <https://deeptools.readthedocs.io/en/develop/content/tools/plotHeatmap.html>`_ creates a **deepTools** `plotHeatmap <https://deeptools.readthedocs.io/en/develop/content/tools/plotHeatmap.html>`_ creates a
heatmap for scores over sets of genomic regions and gives a visualisation for the genome-wide enrichment of the samples. heatmap of read coverage over sets of genomic regions and gives a visualisation for the genome-wide enrichment of the samples.
The `scores <https://deeptools.readthedocs.io/en/develop/content/tools/computeMatrix.html>`_ represent the signal over a
set of regions where all regions are scaled to the same size.
`MACS2 <https://github.com/macs3-project/MACS/blob/master/README.md>`_ **callpeak quality control plots** show for all `MACS2 <https://github.com/macs3-project/MACS/blob/master/README.md>`_ **callpeak quality control plots** show for all
samples and their associated controls the number of peaks and their distributions of peak length, fold-change, FDR and samples and their associated controls the number of peaks and their distributions of peak length, the
p-value from the results of the `fold-change <https://github.com/macs3-project/MACS/blob/master/docs/callpeak.md#output-files>`_ of
the enrichment for their peak summit against random Poisson distribution, FDR and p-value from the results of the
`MACS callpeak analysis <https://hbctraining.github.io/Intro-to-ChIPseq/lessons/05_peak_calling_macs.html>`_. `MACS callpeak analysis <https://hbctraining.github.io/Intro-to-ChIPseq/lessons/05_peak_calling_macs.html>`_.
For more information about Model-based Analysis of ChIP-Seq (MACS) please see published For more information about Model-based Analysis of ChIP-Seq (MACS) please see published
`article <https://genomebiology.biomedcentral.com/articles/10.1186/gb-2008-9-9-r137>`_. `article <https://genomebiology.biomedcentral.com/articles/10.1186/gb-2008-9-9-r137>`_.
**deepTools** `plotProfile <https://deeptools.readthedocs.io/en/develop/content/tools/plotProfile.html>`_ creates a **deepTools** `plotProfile <https://deeptools.readthedocs.io/en/develop/content/tools/plotProfile.html>`_ creates a
profile plot for scores over sets of genomic regions and gives a visualisation for the genome-wide enrichment of the profile plot of read coverage over sets of genomic regions and gives a visualisation for the genome-wide enrichment of the
samples. The `scores <https://deeptools.readthedocs.io/en/develop/content/tools/computeMatrix.html>`_ represent the samples.
signal over a set of regions where all regions are scaled to the same size.
`Mean quality by cycle plot `Mean quality by cycle plot
<https://gatk.broadinstitute.org/hc/en-us/articles/360040506831-MeanQualityByCycle-Picard->`_ **(Picard)** is used as <https://gatk.broadinstitute.org/hc/en-us/articles/360040506831-MeanQualityByCycle-Picard->`_ **(Picard)** is used as
quality control for sequencing machine performance and collects the mean quality by cycle of the bam files after quality control for sequencing machine performance and collects the mean quality by cycle of the bam files after
filtering, sorting, merging and removing orphans. Any spikes in quality within reads may indicate technical problems filtering, sorting, merging and removing orphans. Clear drops in quality within reads may indicate technical problems
during sequencing. For more information about `collected Picard metrics during sequencing. For more information about `collected Picard metrics
<https://gatk.broadinstitute.org/hc/en-us/articles/360037594031-CollectMultipleMetrics-Picard->`_ please <https://gatk.broadinstitute.org/hc/en-us/articles/360037594031-CollectMultipleMetrics-Picard->`_ please
see `documentation <https://broadinstitute.github.io/picard/>`_. see `documentation <https://broadinstitute.github.io/picard/>`_.
...@@ -194,39 +194,38 @@ rule featurecounts_deseq2: ...@@ -194,39 +194,38 @@ rule featurecounts_deseq2:
igv_FDR_5_bed="results/IGV/consensus/merged_library.{antibody}.consensus_{peak}-peaks.deseq2.FDR_0.05.igv.txt", igv_FDR_5_bed="results/IGV/consensus/merged_library.{antibody}.consensus_{peak}-peaks.deseq2.FDR_0.05.igv.txt",
plot_FDR_1_perc_MA=report( plot_FDR_1_perc_MA=report(
directory("results/deseq2/comparison_plots/MA_plots/FDR_0.01_{antibody}consensus_{peak}-peaks"), directory("results/deseq2/comparison_plots/MA_plots/FDR_0.01_{antibody}consensus_{peak}-peaks"),
patterns=["{antibody}.{{group_1_vs_group_2}}.MA-plot_FDR_0.01.pdf"], patterns=["{antibody}.{group_1}_{antibody_1}_{control_1}vs{group_2}_{antibody_2}_{control_2}.MA-plot_FDR_0.01.pdf"],
caption = "../report/plot_deseq2_FDR_1_perc_MA.rst", caption = "../report/plot_deseq2_FDR_1_perc_MA.rst",
category = "DESeq2"), category = "DESeq2"),
plot_FDR_5_perc_MA=report( plot_FDR_5_perc_MA=report(
directory("results/deseq2/comparison_plots/MA_plots/FDR_0.05_{antibody}consensus_{peak}-peaks"), directory("results/deseq2/comparison_plots/MA_plots/FDR_0.05_{antibody}consensus_{peak}-peaks"),
patterns=["{antibody}.{{group_1_vs_group_2}.MA-plot_FDR_0.05.pdf"], patterns=["{antibody}.{group_1}_{antibody_1}_{control_1}vs{group_2}_{antibody_2}_{control_2}.MA-plot_FDR_0.05.pdf"],
caption = "../report/plot_deseq2_FDR_5_perc_MA.rst", caption = "../report/plot_deseq2_FDR_5_perc_MA.rst",
category = "DESeq2"), category = "DESeq2"),
plot_FDR_1_perc_volcano=report( plot_FDR_1_perc_volcano=report(
directory("results/deseq2/comparison_plots/volcano_plots/FDR_0.01_{antibody}consensus_{peak}-peaks"), directory("results/deseq2/comparison_plots/volcano_plots/FDR_0.01_{antibody}consensus_{peak}-peaks"),
patterns=["{antibody}.{{group_1_vs_group_2}}.volcano-plot_FDR_0.01.pdf"], patterns=["{antibody}.{group_1}_{antibody_1}_{control_1}vs{group_2}_{antibody_2}_{control_2}.volcano_FDR_0.01.pdf"],
caption = "../report/plot_deseq2_FDR_1_perc_volcano.rst", caption = "../report/plot_deseq2_FDR_1_perc_volcano.rst",
category = "DESeq2"), category = "DESeq2"),
plot_FDR_5_perc_volcano=report( plot_FDR_5_perc_volcano=report(
directory("results/deseq2/comparison_plots/volcano_plots/FDR_0.05_{antibody}consensus_{peak}-peaks"), directory("results/deseq2/comparison_plots/volcano_plots/FDR_0.05_{antibody}consensus_{peak}-peaks"),
patterns=["{antibody}.{{group_1_vs_group_2}}.volcano-plot_FDR_0.05.pdf"], patterns=["{antibody}.{group_1}_{antibody_1}_{control_1}vs{group_2}_{antibody_2}_{control_2}.volcano_FDR_0.05.pdf"],
caption = "../report/plot_deseq2_FDR_5_perc_volcano.rst", caption = "../report/plot_deseq2_FDR_5_perc_volcano.rst",
category = "DESeq2"), category = "DESeq2"),
plot_sample_corr_heatmap=report( plot_sample_corr_heatmap=report(
directory("results/deseq2/comparison_plots/correlation_heatmaps_{antibody}consensus_{peak}-peaks"), directory("results/deseq2/comparison_plots/correlation_heatmaps_{antibody}consensus_{peak}-peaks"),
patterns=["{antibody}.{{group_1_vs_group_2}}.correlation_heatmap.pdf"], patterns=["{antibody}.{group_1}_{antibody_1}_{control_1}vs{group_2}_{antibody_2}_{control_2}.correlation_heatmap.pdf"],
caption = "../report/plot_deseq2_sample_corr_heatmap.rst", caption = "../report/plot_deseq2_sample_corr_heatmap.rst",
category = "DESeq2"), category = "DESeq2"),
plot_scatter=report( plot_scatter=report(
directory("results/deseq2/comparison_plots/scatter_plots_{antibody}consensus_{peak}-peaks"), directory("results/deseq2/comparison_plots/scatter_plots_{antibody}consensus_{peak}-peaks"),
patterns=["{antibody}.{{group_1_vs_group_2}}.scatter_plots.pdf"], patterns=["{antibody}.{group_1}_{antibody_1}_{control_1}vs{group_2}_{antibody_2}_{control_2}.scatter_plots.pdf"],
caption = "../report/plot_deseq2_scatter.rst", caption = "../report/plot_deseq2_scatter.rst",
category = "DESeq2") category = "DESeq2")
threads: threads:
2 2
params: params:
vst = config["params"]["deseq2"]["vst"], vst = config["params"]["deseq2"]["vst"]
antibody = lambda w: w.antibody
log: log:
"logs/deseq2/{antibody}.consensus_{peak}-peaks.featureCounts.log" "logs/deseq2/{antibody}.consensus_{peak}-peaks.featureCounts.log"
conda: conda:
......
...@@ -11,7 +11,7 @@ rule plot_fingerprint: ...@@ -11,7 +11,7 @@ rule plot_fingerprint:
fingerprint=report( fingerprint=report(
"results/deeptools/{sample}-{control}.plot_fingerprint.pdf", "results/deeptools/{sample}-{control}.plot_fingerprint.pdf",
caption="../report/plot_fingerprint_deeptools.rst", caption="../report/plot_fingerprint_deeptools.rst",
category="QC"), category="other QC"),
counts="results/deeptools/{sample}-{control}.fingerprint_counts.txt", counts="results/deeptools/{sample}-{control}.fingerprint_counts.txt",
qc_metrics="results/deeptools/{sample}-{control}.fingerprint_qcmetrics.txt" qc_metrics="results/deeptools/{sample}-{control}.fingerprint_qcmetrics.txt"
log: log:
......
...@@ -16,7 +16,7 @@ rule multiqc: ...@@ -16,7 +16,7 @@ rule multiqc:
input: input:
get_multiqc_input get_multiqc_input
output: output:
report("results/qc/multiqc/multiqc.html", caption="../report/multiqc_report.rst", category="QC") report("results/qc/multiqc/multiqc.html", caption="../report/multiqc_report.rst", category="MultiQC")
log: log:
"logs/multiqc.log" "logs/multiqc.log"
wrapper: wrapper:
......
...@@ -285,7 +285,7 @@ if (file.exists(ResultsFile) == FALSE) { ...@@ -285,7 +285,7 @@ if (file.exists(ResultsFile) == FALSE) {
## WRITE RESULTS FILE ## WRITE RESULTS FILE
if (MIN_FDR == 0.01) { if (MIN_FDR == 0.01) {
# AVI: dynamically file name extensions added # AVI: dynamically generated file name extensions added
dirs <- c(snakemake@output[["FDR_1_perc_res"]],snakemake@output[["FDR_1_perc_bed"]],snakemake@output[["plot_FDR_1_perc_MA"]], dirs <- c(snakemake@output[["FDR_1_perc_res"]],snakemake@output[["FDR_1_perc_bed"]],snakemake@output[["plot_FDR_1_perc_MA"]],
snakemake@output[["plot_FDR_1_perc_volcano"]],snakemake@output[["FDR_5_perc_res"]],snakemake@output[["FDR_5_perc_bed"]], snakemake@output[["plot_FDR_1_perc_volcano"]],snakemake@output[["FDR_5_perc_res"]],snakemake@output[["FDR_5_perc_bed"]],
snakemake@output[["plot_FDR_5_perc_MA"]],snakemake@output[["plot_FDR_5_perc_volcano"]],snakemake@output[["plot_sample_corr_heatmap"]], snakemake@output[["plot_FDR_5_perc_MA"]],snakemake@output[["plot_FDR_5_perc_volcano"]],snakemake@output[["plot_sample_corr_heatmap"]],
...@@ -296,19 +296,19 @@ if (file.exists(ResultsFile) == FALSE) { ...@@ -296,19 +296,19 @@ if (file.exists(ResultsFile) == FALSE) {
} }
} }
CompResultsFile <- paste(snakemake@output[["FDR_1_perc_res"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".FDR_0.01_results.txt", sep="") CompResultsFile <- file.path(snakemake@output[["FDR_1_perc_res"]], paste(snakemake@params[["antibody"]], ".", CompPrefix, ".FDR_0.01_results.txt", sep=""))
CompBEDFile <- paste(snakemake@output[["FDR_1_perc_bed"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".FDR_0.01_results.bed", sep="") CompBEDFile <- file.path(snakemake@output[["FDR_1_perc_bed"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".FDR_0.01_results.bed", sep=""))
MAplotFile <- paste(snakemake@output[["plot_FDR_1_perc_MA"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".MA-plot_FDR_0.01.pdf", sep="") # AVI: added to create separate pdf files MAplotFile <- file.path(snakemake@output[["plot_FDR_1_perc_MA"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".MA-plot_FDR_0.01.pdf", sep="")) # AVI: added to create separate pdf files
VolcanoPlotFile <- paste(snakemake@output[["plot_FDR_1_perc_volcano"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".volcano_FDR_0.01.pdf", sep="") # AVI: added to create separate pdf files VolcanoPlotFile <- file.path(snakemake@output[["plot_FDR_1_perc_volcano"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".volcano_FDR_0.01.pdf", sep="")) # AVI: added to create separate pdf files
} }
if (MIN_FDR == 0.05) { if (MIN_FDR == 0.05) {
# AVI: dynamically file name extensions added # AVI: dynamically file name extensions added
CompResultsFile <- paste(snakemake@output[["FDR_5_perc_res"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".FDR_0.05_results.txt", sep="") CompResultsFile <- file.path(snakemake@output[["FDR_5_perc_res"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".FDR_0.05_results.txt", sep=""))
CompBEDFile <- paste(snakemake@output[["FDR_5_perc_bed"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".FDR_0.05_results.bed", sep="") CompBEDFile <- file.path(snakemake@output[["FDR_5_perc_bed"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".FDR_0.05_results.bed", sep=""))
# AVI: write paths of FDR 0.05 bed files to igv file # AVI: write paths of FDR 0.05 bed files to igv file
cat(paste0(CompBEDFile, "\t255,0,0\n"),file=snakemake@output[["igv_FDR_5_bed"]],append=TRUE) cat(paste0(CompBEDFile, "\t255,0,0\n"),file=snakemake@output[["igv_FDR_5_bed"]],append=TRUE)
MAplotFile <- paste(snakemake@output[["plot_FDR_5_perc_MA"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".MA-plot_FDR_0.05.pdf", sep="") # AVI: added to create separate pdf files MAplotFile <- file.path(snakemake@output[["plot_FDR_5_perc_MA"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".MA-plot_FDR_0.05.pdf", sep="")) # AVI: added to create separate pdf files
VolcanoPlotFile <- paste(snakemake@output[["plot_FDR_5_perc_volcano"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".volcano_FDR_0.05.pdf", sep="") # AVI: added to create separate pdf files VolcanoPlotFile <- file.path(snakemake@output[["plot_FDR_5_perc_volcano"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".volcano_FDR_0.05.pdf", sep="")) # AVI: added to create separate pdf files
} }
write.table(pass.fdr.table, file=CompResultsFile, col.names=TRUE, row.names=FALSE, sep='\t', quote=FALSE) write.table(pass.fdr.table, file=CompResultsFile, col.names=TRUE, row.names=FALSE, sep='\t', quote=FALSE)
...@@ -335,7 +335,7 @@ if (file.exists(ResultsFile) == FALSE) { ...@@ -335,7 +335,7 @@ if (file.exists(ResultsFile) == FALSE) {
} }
## SAMPLE CORRELATION HEATMAP ## SAMPLE CORRELATION HEATMAP
CorrHeatmapFile <- paste(snakemake@output[["plot_sample_corr_heatmap"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".correlation_heatmap.pdf", sep="") # AVI: dynamically file name extensions added CorrHeatmapFile <- file.path(snakemake@output[["plot_sample_corr_heatmap"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".correlation_heatmap.pdf", sep="")) # AVI: dynamically file name extensions added
pdf(file=CorrHeatmapFile,width=10,height=8) # AVI: added to create separate pdf files pdf(file=CorrHeatmapFile,width=10,height=8) # AVI: added to create separate pdf files
rld.subset <- assay(rld)[,comp.samples] rld.subset <- assay(rld)[,comp.samples]
sampleDists <- dist(t(rld.subset)) sampleDists <- dist(t(rld.subset))
...@@ -345,7 +345,7 @@ if (file.exists(ResultsFile) == FALSE) { ...@@ -345,7 +345,7 @@ if (file.exists(ResultsFile) == FALSE) {
dev.off() # AVI: added to create separate pdf files dev.off() # AVI: added to create separate pdf files
## SCATTER PLOT FOR RLOG COUNTS ## SCATTER PLOT FOR RLOG COUNTS
ScatterPlotFile <- paste(snakemake@output[["plot_scatter"]], "/", snakemake@params[["antibody"]], ".", CompPrefix, ".scatter_plots.pdf", sep="") # AVI: dynamically file name extensions added ScatterPlotFile <- file.path(snakemake@output[["plot_scatter"]], paste(snakemake@wildcards[["antibody"]], ".", CompPrefix, ".scatter_plots.pdf", sep="")) # AVI: dynamically file name extensions added
pdf(file=ScatterPlotFile,width=10,height=8) # AVI: added to create separate pdf files pdf(file=ScatterPlotFile,width=10,height=8) # AVI: added to create separate pdf files
combs <- combn(comp.samples,2,simplify=FALSE) combs <- combn(comp.samples,2,simplify=FALSE)
clabels <- sapply(combs,function(x){paste(x,collapse=' & ')}) clabels <- sapply(combs,function(x){paste(x,collapse=' & ')})
......
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