Skip to content

Commit

Permalink
Merge pull request #22 from 3mmaRand/draft-omics-03
Browse files Browse the repository at this point in the history
Draft omics 03
  • Loading branch information
3mmaRand committed Oct 23, 2023
2 parents 1f2d480 + a02f0d7 commit 4cc9e94
Show file tree
Hide file tree
Showing 24 changed files with 1,762 additions and 103 deletions.
Empty file added Rplot001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/figures/frog-s30-pca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/figures/prog-hspc-volcano.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/figures/prog_hspc-pca.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/images/Xenbase-Logo-Medium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/images/frog-heat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/images/volcano-why.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/images/why_pca_frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/images/why_pca_mouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _site/omics/week-5/meta/xenbase_info.xlsx
Binary file not shown.
1,123 changes: 1,123 additions & 0 deletions _site/omics/week-5/study_before_workshop.html

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions _site/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _site/site_libs/quarto-html/quarto-html.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 5 additions & 35 deletions omics/crib/cont-fgf-s30.R
Original file line number Diff line number Diff line change
Expand Up @@ -458,50 +458,20 @@ s30_log2_trans <- s30_results |>
colnames(s30_log2_trans) <- s30_results$xenbase_gene_id

# just for indep study before
# s30_log2_trans$sample <- row.names(s30_log2_trans)
# a <- s30_log2_trans |> ggplot(aes(x = `XB-GENE-1000007`,
# sample_id <- row.names(s30_log2_trans) |> str_remove("log2_")
# fig <- s30_log2_trans |> ggplot(aes(x = `XB-GENE-1000007`,
# y = `XB-GENE-1000023`)) +
# geom_point() +
# geom_text(aes(label = sample),
# geom_text(aes(label = sample_id),
# vjust = -1, size = 3) +
# scale_x_continuous(expand = c(0.05,0.05)) +
# scale_y_continuous(expand = c(0.05,0.05)) +
# theme_classic()
#
#
# b <- s30_log2_trans |> ggplot(aes(x = `XB-GENE-1000062`,
# y = `XB-GENE-1000072`)) +
# geom_point() +
# geom_text(aes(label = sample),
# vjust = -1, size = 3) +
# scale_x_continuous(expand = c(0.05,0.05)) +
# scale_y_continuous(expand = c(0.05,0.05)) +
# theme_classic()
#
# c <- s30_log2_trans |> ggplot(aes(x = `XB-GENE-1000113`,
# y = `XB-GENE-1000132`)) +
# geom_point() +
# geom_text(aes(label = sample),
# vjust = -1, size = 3) +
# scale_x_continuous(expand = c(0.05,0.05)) +
# scale_y_continuous(expand = c(0.05,0.05)) +
# theme_classic()
#
# d <- s30_log2_trans |> ggplot(aes(x = `XB-GENE-1000149`,
# y = `XB-GENE-1000251`)) +
# geom_point() +
# geom_text(aes(label = sample),
# vjust = -1, size = 3) +
# scale_x_continuous(expand = c(0.05,0.05)) +
# scale_y_continuous(expand = c(0.05,0.05)) +
# theme_classic()
#
# library(patchwork)
# fig <- (a + b) / (c + d)
#
# ggsave("omics/week-5/images/why_pca.png",
# ggsave("omics/week-5/images/why_pca_frog.png",
# plot = fig,
# width = 6, height = 6)
# width = 4, height = 4)

# perform PCA using standard functions
pca <- s30_log2_trans |>
Expand Down
37 changes: 37 additions & 0 deletions omics/crib/hspc-prog.R
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,30 @@ prog_hspc_trans <- prog_hspc_results |>

colnames(prog_hspc_trans) <- prog_hspc_results$ensembl_gene_id

# just for indep study before
# prog_hspc_trans$cell_id <- row.names(prog_hspc_trans)
# prog_hspc_trans <- prog_hspc_trans |>
# extract(cell_id,
# remove = FALSE,
# c("cell_type", "cell_number"),
# "([a-zA-Z]{4})_([0-9]{3})")
#
# fig <- prog_hspc_trans |> ggplot(aes(x = ENSMUSG00000028639,
# y = ENSMUSG00000024053, colour = cell_type)) +
# geom_point() +
# # geom_text(aes(label = cell_id),
# # vjust = -1, size = 3) +
# scale_x_continuous(expand = c(0.05,0.05)) +
# scale_y_continuous(expand = c(0.05,0.05)) +
# theme_classic() +
# theme(legend.position = "none")
#
#
# ggsave("omics/week-5/images/why_pca_mouse.png",
# plot = fig,
# width = 4, height = 4)


# perform PCA using standard functions
pca <- prog_hspc_trans |>
prcomp(scale. = TRUE)
Expand Down Expand Up @@ -625,3 +649,16 @@ ggsave("omics/week-5/figures/prog-hspc-volcano.png",
units = "in",
device = "png")


# # just for the independent study slides
# vol <- prog_hspc_results |>
# ggplot(aes(x = summary.logFC,
# y = FDR)) +
# geom_point() +
# theme_classic()
# ggsave("omics/week-5/images/volcano-why.png",
# plot = vol,
# height = 4.5,
# width = 4.5,
# units = "in",
# device = "png")
Binary file added omics/week-5/images/frog-heat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added omics/week-5/images/volcano-why.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed omics/week-5/images/why_pca.png
Binary file not shown.
Binary file added omics/week-5/images/why_pca_frog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added omics/week-5/images/why_pca_mouse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 11 additions & 10 deletions omics/week-5/overview.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ toc: true
toc-location: right
---

This week we cover how to visualise and interpret the results of your differential expression analysis. The independent study will allow you to check you have what you should have following the [Omics 2: Statistical Analysis workshop](../week-4/workshop.html) and [Consolidation study](../week-4/study_after_workshop.html). It will also summarise the the methods and plots we will go through in the workshop. In the workshop, we will learn how to conduct a Principle Component Analysis (PCA) and plot the results as well as how to create a nicely formatted Volcano plot and heatmap. We will also consider three factors that help us choose an interesting/important gene: the absolute expression, the fold change and the adjusted p-value.
This week we cover how to visualise and interpret the results of your differential expression analysis. The independent study will allow you to check you have what you should have following the [Omics 2: Statistical Analysis workshop](../week-4/workshop.html) and [Consolidation study](../week-4/study_after_workshop.html). It will also summarise the the methods and plots we will go through in the workshop. In the workshop, we will learn how to conduct a Principle Component Analysis (PCA) and plot the results as well as how to create a nicely formatted Volcano plot and heatmap.

We suggest you sit together with your group in the workshop.

Expand All @@ -14,12 +14,11 @@ We suggest you sit together with your group in the workshop.
The successful student will be able to:

- verify they have the required RStudio Project set up and the data and code files from the previous Workshop and Consolidation study
- explain
-
-
-
-
- ,
- explain where gene information came from and add it to their results
- perform a PCA and understand how to interpret them
- create a heatmap and understand how to interpret them
- create a volcano plot and understand how to interpret them


### Instructions

Expand All @@ -29,11 +28,13 @@ The successful student will be able to:

2. [Workshop](workshop.qmd)

i. 💻 ....
i. 💻 Add gene information to the results of DE

ii. 💻 ...
ii. 💻 Perform and plot a PCA

iii. 💻 ....
iii. 💻 Visualise results with a heatmap

iv. 💻 Visualise all the results with a volcano plot

iv. Look after future you!

Expand Down
Loading

0 comments on commit 4cc9e94

Please sign in to comment.