Mercurial > repos > iuc > isoformswitchanalyzer
changeset 1:2c4e879a81cf draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/isoformswitchanalyzer commit 7d278967f9c8d2c6ce0a8f83be2c444822746bbf
author | iuc |
---|---|
date | Fri, 19 May 2023 21:26:00 +0000 |
parents | f3fefb6d8254 |
children | 2b0a6af4b85e |
files | IsoformSwitchAnalyzeR.R isoformswitchanalyzer.xml macros.xml |
diffstat | 3 files changed, 27 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/IsoformSwitchAnalyzeR.R Tue Jan 24 18:37:14 2023 +0000 +++ b/IsoformSwitchAnalyzeR.R Fri May 19 21:26:00 2023 +0000 @@ -4,6 +4,8 @@ warn.conflicts = FALSE) library(argparse, quietly = TRUE, warn.conflicts = FALSE) library(dplyr, quietly = TRUE, warn.conflicts = FALSE) +library(ggplot2, quietly = TRUE, warn.conflicts = FALSE) + # setup R error handling to go to stderr options( @@ -740,7 +742,7 @@ file = outputFile, onefile = FALSE, height = 6, - width = 9 + width = 12 ) consequenceSummary <- extractConsequenceSummary( @@ -835,7 +837,7 @@ file = outputFile, onefile = FALSE, height = 6, - width = 9 + width = 12 ) splicingSummary <- extractSplicingSummary( SwitchList, @@ -863,34 +865,37 @@ ### Volcano like plot: outputFile <- file.path(getwd(), "volcanoPlot.pdf") + pdf( file = outputFile, onefile = FALSE, height = 6, width = 9 ) - ggplot(data = SwitchList$isoformFeatures, aes(x = dIF, y = -log10(isoform_switch_q_value))) + - geom_point(aes(color = abs(dIF) > 0.1 & - isoform_switch_q_value < 0.05), # default cutoff - size = 1) + + + p <- ggplot(data = SwitchList$isoformFeatures, aes(x = dIF, y = -log10(isoform_switch_q_value))) + + geom_point( + aes(color = abs(dIF) > 0.1 & isoform_switch_q_value < 0.05), # default cutoff + size = 1 + ) + geom_hline(yintercept = -log10(0.05), linetype = "dashed") + # default cutoff geom_vline(xintercept = c(-0.1, 0.1), linetype = "dashed") + # default cutoff facet_wrap(~ condition_2) + + #facet_grid(condition_1 ~ condition_2) + # alternative to facet_wrap if you have overlapping conditions scale_color_manual("Signficant\nIsoform Switch", values = c("black", "red")) + labs(x = "dIF", y = "-Log10 ( Isoform Switch Q Value )") + theme_bw() + print(p) dev.off() - ### Switch vs Gene changes: outputFile <- file.path(getwd(), "switchGene.pdf") pdf( file = outputFile, - onefile = FALSE, height = 6, width = 9 ) - ggplot(data = SwitchList$isoformFeatures, + p <- ggplot(data = SwitchList$isoformFeatures, aes(x = gene_log2_fold_change, y = dIF)) + geom_point(aes(color = abs(dIF) > 0.1 & isoform_switch_q_value < 0.05), @@ -901,6 +906,7 @@ scale_color_manual("Signficant\nIsoform Switch", values = c("black", "red")) + labs(x = "Gene log2 fold change", y = "dIF") + theme_bw() + print(p) dev.off() outputFile <- file.path(getwd(), "splicingGenomewide.pdf") @@ -908,12 +914,12 @@ file = outputFile, onefile = FALSE, height = 6, - width = 9 + width = 14 ) splicingGenomeWide <- extractSplicingGenomeWide( SwitchList, - featureToExtract = "all", - splicingToAnalyze = c("A3", "MES", "ATSS"), + featureToExtract = "isoformUsage", + splicingToAnalyze = "all", plot = TRUE, returnResult = TRUE )
--- a/isoformswitchanalyzer.xml Tue Jan 24 18:37:14 2023 +0000 +++ b/isoformswitchanalyzer.xml Fri May 19 21:26:00 2023 +0000 @@ -25,7 +25,7 @@ ln -s '${functionMode.transcriptome}' './transcriptome.fasta.gz' && #set $transcriptome = './transcriptome.fasta.gz' #else - ln -s '${functionMode.transcriptome}' './transcriptome.fasta' + ln -s '${functionMode.transcriptome}' './transcriptome.fasta' && #set $transcriptome = './transcriptome.fasta' #end if #if $functionMode.genomeAnnotation.is_of_type("gtf.gz"): @@ -33,7 +33,7 @@ #set $annotation = './annotation.gtf.gz' #else ln -s '${functionMode.genomeAnnotation}' './annotation.gtf' && - #set $annotation = './annotation.gtf' + #set $annotation = './annotation.gtf' #end if mkdir -p 'input_files' && #if $functionMode.countFiles != 'disabled': @@ -766,7 +766,7 @@ </element> <element name="splicingGenomewide" ftype="pdf"> <assert_contents> - <has_size value="68069" delta="300"/> + <has_size value="165752" delta="300"/> </assert_contents> </element> <element name="splicingSummary" ftype="pdf"> @@ -776,12 +776,12 @@ </element> <element name="switchGene" ftype="pdf"> <assert_contents> - <has_size value="3611" delta="300"/> + <has_size value="18432" delta="300"/> </assert_contents> </element> <element name="volcanoPlot" ftype="pdf"> <assert_contents> - <has_size value="3611" delta="300"/> + <has_size value="20147" delta="300"/> </assert_contents> </element> </output_collection> @@ -895,7 +895,7 @@ </element> <element name="splicingGenomewide" ftype="pdf"> <assert_contents> - <has_size value="68069" delta="300"/> + <has_size value="165752" delta="300"/> </assert_contents> </element> <element name="splicingSummary" ftype="pdf"> @@ -905,12 +905,12 @@ </element> <element name="switchGene" ftype="pdf"> <assert_contents> - <has_size value="3611" delta="300"/> + <has_size value="18432" delta="300"/> </assert_contents> </element> <element name="volcanoPlot" ftype="pdf"> <assert_contents> - <has_size value="3611" delta="300"/> + <has_size value="20147" delta="300"/> </assert_contents> </element> </output_collection>
--- a/macros.xml Tue Jan 24 18:37:14 2023 +0000 +++ b/macros.xml Fri May 19 21:26:00 2023 +0000 @@ -1,6 +1,6 @@ <macros> <token name="@TOOL_VERSION@">1.20.0</token> - <token name="@SUFFIX_VERSION@">0</token> + <token name="@SUFFIX_VERSION@">1</token> <xml name="requirements"> <requirements> <requirement type="package" version="@TOOL_VERSION@">bioconductor-isoformswitchanalyzer</requirement>