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 in drawing coancestry matrix #28

Closed
Lomousmishra opened this issue Jan 22, 2024 · 2 comments
Closed

Issue in drawing coancestry matrix #28

Lomousmishra opened this issue Jan 22, 2024 · 2 comments

Comments

@Lomousmishra
Copy link

Hi Milan,
I am having issue with drawing co ancestry matrix using your fineradstructureplot.R script.
The issue is following:

datamatrix<-dataraw[fullorder,fullorder]
Error in dataraw[fullorder, fullorder] : subscript out of bounds
I am using R version 3.6.1 inside conda, as earlier with R-4.2 also same issue occurred.
Please suggest me the possible solution for plotting.
Thanks,
Lomous

@danjlawson
Copy link

You normally get this error when the elements of "fullorder" are not in the row names and/or column names of your matrix "dataraw". Explanations include a) you start a name with a number or special character; b) there are "." characters, which are coerced to "_" in column names (you can just replace them; this could happen for other special characers) or c) you've done something bespoke with the data matrix construction and there is not a complete match. I recommend asking "all(fullorder %in% rownames(dataraw))" or similar to find the problem.

@Lomousmishra
Copy link
Author

Thank you very much.
I modified the labels and the script worked for me.
Lomous

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

2 participants