Skip to content

Commit

Permalink
Merge pull request #25 from eberdan/patch-2
Browse files Browse the repository at this point in the history
Update QC_nf-core.Rmd
  • Loading branch information
lpantano authored May 21, 2024
2 parents b3a5109 + 488288b commit 9a56e75
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions inst/rmarkdown/templates/rnaseq/skeleton/QC/QC_nf-core.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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") +
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9a56e75

Please sign in to comment.