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

readQ dropping a column when individual labels are included #94

Open
kdrotos opened this issue Feb 26, 2024 · 0 comments
Open

readQ dropping a column when individual labels are included #94

kdrotos opened this issue Feb 26, 2024 · 0 comments

Comments

@kdrotos
Copy link

kdrotos commented Feb 26, 2024

Hi there, thanks so much for developing this package, it's been extremely helpful!

I have encountered a problem when importing a fastSTRUCTURE file which I have added my own individual labels to. This particular file was for k=4, with 38 individuals.

I added the labels as rownames, and saved it as a new file as such:
write.table(fs_q4_df, "file_indlabs.meanQ", sep=" ", row.names=TRUE, col.names = FALSE)

I then tried to import it as a qlist:
qlist <- readQ(files="file_indlabs.meanQ")

but the qlist shows as having 3 clusters with 38 individuals, and no rownames; it is dropping the 4th column (cluster).

I tested it with read.table (in case something was wrong with the file) and it shows up as expected, with 4 columns and the rownames.

Is readQ unable to handle individual labels for non-STRUCTURE imports? Or is there a different way to save the file so that readQ will recognize it properly?

Thanks!!

Pophelper version 2.3.1
R version 4.3.2

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