Skip to content

readQ dropping a column when individual labels are included #94

@kdrotos

Description

@kdrotos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions