Open sjasws opened 1 year ago
Try using the transpose of the input PC matrix with 5 to 10 PCs: t(data) arc_ks_t = k_fit_pch(data = t(integrated.10pcs), ks = 3:8, check_installed = TRUE, bootstrap = FALSE, bootstrap_N = 10, sample_prop = 0.65, bootstrap_type = "s", seed = 345, simplex = FALSE, var_in_dims = FALSE, normalise_var = TRUE)
plot_arc_var(arc_ks_t, type = "varexpl", point_size = 2, line_size = 1.5) + ylim(0, 1) + theme_classic(base_size = 8)
The p-value plot is generated by plotting the randomise_fit_pch function. However, I believe the ParteoTI R package is not being developed further. For similar issues that I encountered, I recommend the MATLAB PartTI package to confirm the number of archetypes and get pvalues with raw data (not PCs).
Thank you for your reply! I really ran the k_fit_pch(), plot_arc_va() and randomise_fit_pch() after read your available codes, and got the results.
These are important questions. I would suggest using a number of PCs that is most appropriate for the data (e.g. based on an elbow plot). The highly variable genes used in RPCA likely contribute the most to your PCs so should be appropriate for use.
These are important questions. I would suggest using a number of PCs that is most appropriate for the data (e.g. based on an elbow plot). The highly variable genes used in RPCA likely contribute the most to your PCs so should be appropriate for use.
My question now is how to generate the elbow plot in ParetoTI R to guide the appropriate number of PCs selection. It seems did not exist the function in R, so that hardly to decided. I have notice you used the first five PCs in the your study, I think that would be fine. But when I want to reproduce figure S4 A and B, the R will report warnning that can not calculate t-ratio when run k_fit_pch() and fit_pch() for more than 7 archetypes (less than or equal to 6 is feasible), as well as run randomise_fit_pch() to get the p-value. This is the root cause of my annoyance. I really can't find the appropriate method and basis to decide the number of PCs to input. Thank you!
This can be done using base R functions to create scree/elbow plots or using other packages. Seurat has an ElbowPlot function for this purpose.
It's fine to do the ElbowPlot function in Seurat to determine the number of PCs, thank you. By the way, the elbow plots generated by the MATLAB PartTI suggested to use 3 PCs to construct 4 archetypes. I followed its advice, but ended up with a p-value of 0.16 for the t-ratio, which seems to be a result of poor adaptation to data. I found that if I increase the number of archetypes I would decrease the P-value, but this seems to violate the method of selecting the number of archetypes. How should I trade-off between ESV and P-value?
Dear sir or madam, Now, I am constructing an archetype model on my scRNA-seq data the same way you did in "Evolution of core archetypal phenotypes in progressive high grade serous ovarian cancer. Nat Commun 12, 3039 (2021)." However, I had several problems choosing the number of archetypes. I tried to reproduce the figures in your article, but failed. Can you give me some guidance? Thanks!
I am not a native English speaker, so please point out if there are any problems with my description and let me try to describe it in detail again. Looking forward to your reply and appreciate your possible help!