gl.run.popstructure error

18 views
Skip to first unread message

Alan Male

unread,
Oct 13, 2025, 4:51:55 AMOct 13
to dartR
Hi, I am trying to run popstructure within R. 
Everything goes on well but I get this message right at the end:
Error in seq.default(1,ncol(Q)-5, by=1):wrong sign in 'by' argument.
How do I go about it?

Jose Luis Mijangos

unread,
Oct 13, 2025, 1:36:57 PMOct 13
to dartR
Hi,

Would you mind sending me a small subset of your data that replicates the behaviour you’re seeing to my email (luis.mijangos at gmail.com)? The code below shows how you can create and save a subset.

If you could please send me:

1. the file `test.rds` (from the code example below), and
2. the code you’re running,

that would be great.

library(dartRverse)

# subset loci
# you can increase the number of loci, for example n = 400
test <- gl.subsample.loci(your_data.gl, n = 200, method = "random")

# subset individuals
# you can adjust the number of individuals, e.g. indNames(test)[1:20]
test <- gl.keep.ind(test, ind.list = indNames(test)[1:10])

# save object in the working directory
saveRDS(test, "test.rds")

Cheers,
Luis
Reply all
Reply to author
Forward
0 new messages