Skip to content

Commit a3d7f5c

Browse files
committed
Update slides-25.qmd
1 parent dfea2a5 commit a3d7f5c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

slides/slides-25.qmd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,25 +575,26 @@ psi_pca <- prcomp(t(psis_mtx))
575575
576576
# Add annotations of the conditions to the samples
577577
psi_pca_pc <-
578-
tibble(
579-
pc = psi_pca$x,
578+
data.frame(
579+
psi_pca$x,
580580
sample = colnames(psis_mtx)
581-
) |>
581+
) |>
582582
mutate(
583583
condition = case_when(
584584
grepl("S1", sample) ~ "RBFOX2kd",
585585
.default = "Controlkd"
586586
)
587-
)
587+
)
588+
588589
589590
# Get the amount of variances contained within PC1 and PC2
590-
psi.pca.summary <- summary(psi.pca)$importance
591+
psi.pca.summary <- summary(psi_pca)$importance
591592
pc1var <- round(psi.pca.summary[2, 1] * 100, 1)
592593
pc2var <- round(psi.pca.summary[2, 2] * 100, 1)
593594
594595
# Plot PCA data
595596
ggplot(
596-
psi.pca.pc,
597+
psi_pca_pc,
597598
aes(
598599
x = PC1,
599600
y = PC2,

0 commit comments

Comments
 (0)