Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellipses colour do not match plot points colour #307

Closed
qutkat opened this issue May 28, 2024 · 5 comments · Fixed by #326
Closed

Ellipses colour do not match plot points colour #307

qutkat opened this issue May 28, 2024 · 5 comments · Fixed by #326
Assignees
Labels
bug Something isn't working wip work-in-progress

Comments

@qutkat
Copy link

qutkat commented May 28, 2024

Hello - I am trying to run an sPLSDA showing beta diversity data for 3 different weeks. When the plot is produced the ellipses are correct for all 3 weeks, but the colour of the data points for 2 of the weeks does not match the colour of the ellipses - they are switched around. I tried restarting Rstudio and reloading mixOmics from github but it is still happening.

betaplot$Week <- factor(betaplot$Week, levels = c("1", "5", "11"), labels = c("Week 1", "Week 5", "Week 11"))
taxon = taxa %>% rownames_to_column('Sample ID') %>% semi_join(betaplot, taxa, by = 'Sample ID') %>% column_to_rownames('Sample ID')

result = splsda(taxon, betaplot$Week, ncomp = 2, keepX = c(466,466))
plot = plotIndiv(result,centroid = FALSE, ellipse = TRUE,ind.names = FALSE, title = "sPLSDA - Beta diversity by Week", legend=TRUE)

I have tried to upload the resulting image here:
Capture

@qutkat qutkat added the bug Something isn't working label May 28, 2024
@qutkat
Copy link
Author

qutkat commented May 29, 2024

Hello - please note that I also tried running your Case Study of sPLS-DA with SRBCT dataset using the exact code provided and I encountered the same issue. The blue and orange data points were switched around and did not match the image provided in the tutorial, but the ellipses were correct.

@samuelmontgomery
Copy link

I am having the same issue (and have for a few versions now but it seems to have not been fixed) when using plotIndiv - I much prefer using mixOmics for my work, but I am having to find alternative for plotting results at the moment as it makes it hard to interpret

@evaham1 evaham1 self-assigned this Sep 23, 2024
@evaham1 evaham1 added the wip work-in-progress label Sep 23, 2024
@evaham1
Copy link
Collaborator

evaham1 commented Oct 18, 2024

Also mentioned by post in mixOmics discussion forum:
https://mixomics-users.discourse.group/t/data-points-and-ellipses-colour-do-not-match/1576

@evaham1 evaham1 linked a pull request Oct 21, 2024 that will close this issue
evaham1 added a commit that referenced this issue Oct 22, 2024
@samuelmontgomery
Copy link

Is there a way to install the pre-release version with this fix?
Installing via GitHub installs a version older than the Bioconductor release (6.30)
I am trying to produce some plots for a manuscript but now all the colours are still off

@evaham1
Copy link
Collaborator

evaham1 commented Nov 8, 2024

Hi @samuelmontgomery yes the github version needed a version bump because of the new Bioconductor release, thanks for pointing that out have just done that!

If you run the following command this will install the Github version of mixOmics which is ahead of the Bioconductor version (currently at 6.30.3) and should have the fix incorporated. Please let me know if you have any issues!
devtools::install_github("mixOmicsTeam/mixOmics")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wip work-in-progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants