Question: Sleuth PCA plots - how to change axis to percentage?
0
gravatar for BioBing
3.1 years ago by
BioBing120
Denmark
BioBing120 wrote:

Hi all,

I was wondering if there is an easy way in "plot_pca" of the Sleuth package (R package for analyzing Kallisto output) to add percentages on x and y labels?

Thanks!

Cheers, Birgitte

plot_pca(so, pc_x=1L, pc_y = 2L, use_filtered = TRUE,
    units = "tpm", text_labels=FALSE, color_by = "treat",
    point_size = 7, point_alpha = 0.8) +
  theme(axis.text.y=element_text(size=10),
        axis.text.x = element_text(size=10),
        legend.position = "bottom",
        legend.text = element_text(size=10),
        legend.title = element_blank()) +
  scale_x_continuous(limits = c(-9000,9000)) + 
  scale_y_continuous(limits = c(-8000,8000))
rna-seq kallisto pca sleuth R • 1.8k views
ADD COMMENTlink modified 2.3 years ago by bruce.moran860 • written 3.1 years ago by BioBing120
0
gravatar for bruce.moran
2.3 years ago by
bruce.moran860
Ireland
bruce.moran860 wrote:

I had the same question, so for anyone else coming across this:

ppv <- plot_pc_variance(so)
PCpc <- ppv$data$var
names(PCpc) <- paste0("PC", seq(1:length(PCpc)))

Also NB from here that TPM is probably not a good input to PCA.

ADD COMMENTlink written 2.3 years ago by bruce.moran860
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1142 users visited in the last hour