From 488288ba76d3cfeefbc600fdb4d2dba4f91c833e Mon Sep 17 00:00:00 2001 From: eberdan Date: Tue, 21 May 2024 11:32:16 -0400 Subject: [PATCH] Update QC_nf-core.Rmd --- .../rnaseq/skeleton/QC/QC_nf-core.Rmd | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/inst/rmarkdown/templates/rnaseq/skeleton/QC/QC_nf-core.Rmd b/inst/rmarkdown/templates/rnaseq/skeleton/QC/QC_nf-core.Rmd index 1758a3c..6248c60 100644 --- a/inst/rmarkdown/templates/rnaseq/skeleton/QC/QC_nf-core.Rmd +++ b/inst/rmarkdown/templates/rnaseq/skeleton/QC/QC_nf-core.Rmd @@ -40,7 +40,6 @@ source(params$project_file) - PI: `r PI` - Analyst: `r analyst` - Experiment: `r experiment` -- Aim: `r aim` ```{r load_libraries, cache = FALSE, message = FALSE, warning=FALSE} @@ -187,7 +186,19 @@ metrics <- metrics %>% mutate(x5_3_bias = qualimap_5_3_bias) # Sometimes we don't have rRNA due to mismatch annotation, We skip this if is the case -gtf=rtracklayer::import(gtf_fn) + +if (params$genome == "hg38") { + gtf <- "../../data/hg38.rna.gtf" +} elseif (params$genome == "mm10") { + gtf <- "../../data/mm10.rna.gtf" +} elseif (params$genome == "mm39") { + gtf <- "../../data/mm39.rna.gtf" +} elseif (params$genome == "other") { + gtf <- gtf_fn +} else { + print("No genome provided! Please add it to params_qc_nf-core.R") +} + one=grep("gene_type", colnames(as.data.frame(gtf)), value = TRUE) another=grep("gene_biotype", colnames(as.data.frame(gtf)), value = TRUE) @@ -414,7 +425,7 @@ metrics %>% ggplot(aes(x = factor(sample, level = order), y = r_and_t_rna_rate * 100, color = .data[[factor_of_interest]])) + - geom_point(alpha = 0.5, size=4) + + geom_point(alpha = 0.5) + ylab("tRNA/rRNA rate, %")+ ylim(0, rrna_ylim) + ggtitle("tRNA/rRNA mapping rate") + @@ -488,8 +499,11 @@ pca1 <- degPCA(vst, coldat_for_pca, pca2 <- degPCA(vst, coldat_for_pca, condition = factor_of_interest, data = T, pc1="PC3", pc2="PC4")[["plot"]] + + pca1 + scale_color_cb_friendly() pca2 + scale_color_cb_friendly() + ``` # Covariates analysis