mirror of
https://github.com/gladstone-institutes/Bioinformatics-Workshops.git
synced 2025-11-30 09:45:43 -08:00
Minor updates to the slide deck and scripts
This commit is contained in:
parent
539a00f9d6
commit
0b57c58052
7 changed files with 42 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#setwd()
|
||||
setwd("~/Dropbox (Gladstone)/Bioinformatics/Training_Workshops/Gladstone-internal/Intermediate_RNA-seq_Fall_2019")
|
||||
setwd("~/Dropbox (Gladstone)/Gladstone chapters/Workshops/2020/intermediate-r-rna-seq")
|
||||
|
||||
library(magrittr)
|
||||
library(edgeR)
|
||||
|
|
@ -34,7 +34,7 @@ colnames(GenewiseCounts) %<>% substring(.,1,7)
|
|||
#Concept 1: MA plots
|
||||
#------------------------
|
||||
|
||||
two_samples <- GenewiseCounts[, c(2, 3)] %>% #Replicate samples
|
||||
two_samples <- GenewiseCounts[, c(2, 13)] %>% #Replicate samples
|
||||
add(., 1) %>%
|
||||
log2()
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ legend("top", legend=levels(group) %>% substr(., 1, 3),
|
|||
pch=pch, col=colors, ncol=2, cex = 0.5)
|
||||
|
||||
#PCA plot
|
||||
cpm <- cpm(y, log = TRUE, prior.count = 0.01)
|
||||
cpm <- cpm(y, log = TRUE)
|
||||
rv <- apply(cpm,1,var)
|
||||
|
||||
#Select genes with highest variance.
|
||||
|
|
|
|||
BIN
intermediate-r-rna-seq/Casein.png
Normal file
BIN
intermediate-r-rna-seq/Casein.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
intermediate-r-rna-seq/Random.png
Normal file
BIN
intermediate-r-rna-seq/Random.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
39
intermediate-r-rna-seq/tbd.R
Normal file
39
intermediate-r-rna-seq/tbd.R
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
cnts_casein <- cpm(y)[y$genes$Symbol == "Csn1s2b", ]
|
||||
cnts_rndm <- cpm(y)[100, ]
|
||||
|
||||
df <- data.frame(Casein = cnts_casein,
|
||||
Random = cnts_rndm,
|
||||
targets[, c("CellType", "Status")])
|
||||
|
||||
p <- ggplot(df, aes(x=Random, y=1,
|
||||
color=CellType, shape=Status)) +
|
||||
geom_point(size=2.5) +
|
||||
scale_x_log10() +
|
||||
scale_y_log10() +
|
||||
theme_classic() +
|
||||
theme(axis.title.y = element_blank(),
|
||||
axis.text.y = element_blank(),
|
||||
axis.ticks.y = element_blank(),
|
||||
axis.line.y = element_blank(),
|
||||
legend.position = "top",
|
||||
legend.box = "vertical",
|
||||
plot.margin = margin(0.5, 0.5, 0.5, 0.5, "cm"))
|
||||
ggsave("Random.png",
|
||||
p,
|
||||
width = 3,
|
||||
height = 3)
|
||||
|
||||
p <- ggplot(df, aes(x=1, y=Random,
|
||||
color=CellType, shape=Status)) +
|
||||
geom_point(size=2.5) +
|
||||
scale_x_log10() +
|
||||
scale_y_log10() +
|
||||
theme(axis.title.x = element_blank(),
|
||||
axis.text.x = element_blank(),
|
||||
axis.ticks.x = element_blank())
|
||||
|
||||
ggsave("Random.png",
|
||||
p)
|
||||
|
||||
xlab(paste("PC1:", pc1_var, "% variance")) +
|
||||
ylab(paste("PC2:", pc2_var, "% variance"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue