diff --git a/workflows/05_plotshinyPrep/05_plot_shinyPrep.R b/workflows/05_plotshinyPrep/05_plot_shinyPrep.R deleted file mode 100644 index 664bf3919e0b69d7d8c62100728e8f97aa09048d..0000000000000000000000000000000000000000 --- a/workflows/05_plotshinyPrep/05_plot_shinyPrep.R +++ /dev/null @@ -1,16 +0,0 @@ - -######################## -# Prep data for shiny app -######################## - - -install.packages("openxlsx",dependencies=TRUE, lib='./lib',repos='http://cran.rstudio.com/') -library(openxlsx, lib.loc = "./lib") - -options <- commandArgs(trailingOnly = TRUE) -wd <- getwd() - -expression_data <- read.csv(file = options[1]) -available_genes <- unique(expression_data$target_id) - -save(expression_data, available_genes, file = paste0(wd, "/05_shinyPrep.RData")) diff --git a/workflows/05_plotshinyPrep/plot_shinyPrep.cwl b/workflows/05_plotshinyPrep/plot_shinyPrep.cwl deleted file mode 100644 index 04ffba69da5da065507a0df34d17bc7def4834f3..0000000000000000000000000000000000000000 --- a/workflows/05_plotshinyPrep/plot_shinyPrep.cwl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env cwl-runner - -cwlVersion: v1.2 -class: CommandLineTool -hints: - DockerRequirement: - dockerPull: rocker/tidyverse:4.1 -requirements: - - class: NetworkAccess - networkAccess: true - - class: InlineJavascriptRequirement - - class: InitialWorkDirRequirement - listing: - - entry: "$({class: 'Directory', listing: []})" - entryname: "./lib" - writable: true -baseCommand: Rscript -inputs: - rScript: - type: File - inputBinding: - position: 1 - kallistoResults: - type: File - inputBinding: - position: 2 -outputs: - outFile: - type: File - outputBinding: - glob: "*05_shinyPrep.RData" \ No newline at end of file diff --git a/workflows/05_plotshinyPrep/plot_shinyPrep.yml b/workflows/05_plotshinyPrep/plot_shinyPrep.yml deleted file mode 100644 index 426ca847efcbc3e014897beafd870ce2409ebcd7..0000000000000000000000000000000000000000 --- a/workflows/05_plotshinyPrep/plot_shinyPrep.yml +++ /dev/null @@ -1,6 +0,0 @@ -rScript: - class: File - path: ./05_plot_shinyPrep.R -kallistoResults: - class: File - path: ./../../runs/run1/03_kallisto_df.csv \ No newline at end of file diff --git a/workflows/01_KallistoQuant.sh b/workflows/kallisto_sleuth/01_KallistoQuant.sh similarity index 100% rename from workflows/01_KallistoQuant.sh rename to workflows/kallisto_sleuth/01_KallistoQuant.sh diff --git a/workflows/02_InstallPackages.R b/workflows/kallisto_sleuth/02_InstallPackages.R similarity index 100% rename from workflows/02_InstallPackages.R rename to workflows/kallisto_sleuth/02_InstallPackages.R diff --git a/workflows/03_KallistoCollect.R b/workflows/kallisto_sleuth/03_KallistoCollect.R similarity index 100% rename from workflows/03_KallistoCollect.R rename to workflows/kallisto_sleuth/03_KallistoCollect.R diff --git a/workflows/04_Sleuth.R b/workflows/kallisto_sleuth/04_Sleuth.R similarity index 100% rename from workflows/04_Sleuth.R rename to workflows/kallisto_sleuth/04_Sleuth.R diff --git a/workflows/05_plot_shinyPrep.R b/workflows/kallisto_sleuth/05_plot_shinyPrep.R similarity index 100% rename from workflows/05_plot_shinyPrep.R rename to workflows/kallisto_sleuth/05_plot_shinyPrep.R diff --git a/workflows/_workflow_wrapper.sh b/workflows/kallisto_sleuth_wrapper.sh similarity index 50% rename from workflows/_workflow_wrapper.sh rename to workflows/kallisto_sleuth_wrapper.sh index f34687e4d51665ce9f12e4a6ec357439e69d0699..d0bbe3114bec8a6a30b98627e78b78ae3f451f5d 100755 --- a/workflows/_workflow_wrapper.sh +++ b/workflows/kallisto_sleuth_wrapper.sh @@ -6,20 +6,22 @@ # This is supposed to wrap the workflow from kallisto quantification to sleuth diff gene expression # Execute within <ARC root>/workflows: -## change rights: `chmod a+x _workflow_wrapper.sh` -## execute script: `./_workflow_wrapper.sh <run_name> <arc_root>` -## Example: ./_workflow_wrapper.sh "run1" "~/03DataPLANT_gitlab/samplearc_rnaseq/" +## change rights: `chmod a+x kallisto_sleuth_wrapper.sh` +## execute script: `./kallisto_sleuth_wrapper.sh <run_name> <arc_root>` +## Example: ./kallisto_sleuth_wrapper.sh "run2" "~/03DataPLANT_gitlab/samplearc_rnaseq/" -run_name=$1 +run_name='kallisto_sleuth/'$1 arc_root=$2 +mkdir $arc_root'/workflows/'$run_name + # chmod a+x 01_KallistoQuant.sh # ./01_KallistoQuant.sh $run_name $arc_root -Rscript 02_InstallPackages.R -Rscript 03_KallistoCollect.R $run_name $arc_root -Rscript 04_Sleuth.R $run_name $arc_root -Rscript 05_plot_shinyPrep.R $run_name $arc_root +# Rscript 02_InstallPackages.R +# Rscript 03_KallistoCollect.R $run_name $arc_root +# Rscript 04_Sleuth.R $run_name $arc_root +# Rscript 05_plot_shinyPrep.R $run_name $arc_root # store variables for test runs in R # run_name="run1" diff --git a/workflows/06_plot_shinyApp.Rmd b/workflows/plot_shinyApp.Rmd similarity index 85% rename from workflows/06_plot_shinyApp.Rmd rename to workflows/plot_shinyApp.Rmd index 09b641d24c043e285b0d376c994d81cc54352c7b..19b291643efdeb4f9973950f9babd178ab501858 100644 --- a/workflows/06_plot_shinyApp.Rmd +++ b/workflows/plot_shinyApp.Rmd @@ -14,8 +14,7 @@ knitr::opts_chunk$set(echo = TRUE) # Load data -ARC_root="~/03_DataPLANT_gitlab/samplearc_rnaseq/" -load(file = paste0(ARC_root, 'runs/05_shinyPrep.RData')) +load(file = "../runs/run1/05_shinyPrep.RData") ``` @@ -24,9 +23,9 @@ load(file = paste0(ARC_root, 'runs/05_shinyPrep.RData')) # Setup plot environment -required.packages <- c('knitr', 'kableExtra', ## RMarkdown, +required.packages <- c('kableExtra', ## RMarkdown, "shiny", "tidyverse", ## data loading and shaping - "RColorBrewer", "shiny" ## plotting + "RColorBrewer" ## plotting ) for(package in required.packages) @@ -51,7 +50,7 @@ current_selection <- sample(expression_data$target_id, 10) plot_set <- subset(expression_data, target_id %in% current_selection) -ggplot(plot_set, aes(x = Group, y = tpm, group = Group)) + +ggplot(plot_set, aes(x = Photosynthesis.mode, y = tpm, group = Photosynthesis.mode)) + stat_summary(fun = 'mean', geom = 'bar') + geom_point(size = 0.5) + facet_wrap(~ target_id , scales = "free") + @@ -87,7 +86,7 @@ sidebarLayout( ## Facetted by gene only - ggplot(plot_set, aes(x = Group, y = tpm)) + + ggplot(plot_set, aes(x = Photosynthesis.mode, y = tpm)) + stat_summary(fun = 'mean', geom = 'bar') + geom_point(size = 0.5) + facet_wrap( ~ target_id, scales = "free") +