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

Issue with subsetgrp + sortind = "all" when used together #90

Open
iona-ce opened this issue Apr 21, 2023 · 0 comments
Open

Issue with subsetgrp + sortind = "all" when used together #90

iona-ce opened this issue Apr 21, 2023 · 0 comments

Comments

@iona-ce
Copy link

iona-ce commented Apr 21, 2023

Hi,

I'm trying to create a plot based on STRUCTURE output. I've gone through the online tutorials and have been able to create plots, however I have encountered an issue when trying to get a plot that respects both arguments sortind = "all" as well as a custom group order that I would like the plot to display.

I've pasted the code below. If I don't include sortind = "all", then the order of the groups as I wish them to appear (subsetgrp = order_cluster) works fine, but if I then add it back in, the individuals become sorted by Q, but the groups are no longer in the order I would like them to be. Are there any solutions for this or are these arguments mutually exclusive?

order_cluster <- c("Poole", "F/down", "Walkford", "Shawford", "Wr/sham", "Walton", "Norwood", "Crawley", "Hastings")

Visualise

p2 <- plotQ(slist2[c(24, 27)], imgoutput = "join", returnplot = TRUE, exportplot = FALSE, basesize = 11,
sharedindlab = FALSE,
sortind = "all",
grplab = bws18_pop, grplabsize = 4,
linesize = 0.8, ordergrp = TRUE,
subsetgrp = order_cluster,
showdiv = TRUE, divsize = 1,
splab = c("K=8", "K=9"), splabsize = 17)

grid.arrange(p2$plot[[1]])

Additional info:
packageVersion("pophelper") = 2.3.1
R version 4.1.2 (2021-11-01)
sysname "Darwin"

Thank you and all the best. Please let me know if I can provide you with any other information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant