run structure

45 views
Skip to first unread message

laiaju...@gmail.com

unread,
Jan 9, 2025, 6:25:21 PMJan 9
to dartR
Hi all,

I have been trying to run Structure today, but despite trying different approaches, the error persists. Could someone please help me? Additionally, I am unable to update to the development version.
Thank you,
Laia


YFT <- gl.run.structure(gl2, k.range = 2:6, num.k.rep = 10, exec = + 'C:/Users/User/Desktop/console/structure.exe',plot.out = FALSE, + burnin=50000, numreps=100000, noadmix=FALSE) Starting gl.run.structure Processing genlight object with SNP data Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'gtypes.created.on.2025-01-09.14.41.45.structureRun/gtypes.created.on.2025-01-09.14.41.45.structureRun.k2.r1_data': Permission denied


dartRverse packages: dartR.base 0.88 | CRAN: 0.98 | Github: 0.88 (main) | 0.97 (beta) | 1.0.0 (dev) dartR.data 1.0.4 | CRAN: 1.0.8 | Github: 1.0.8 (main) | 1.0.8 (beta) | 1.0.8 (dev) dartR.sim 0.70 | CRAN: 0.70 | Github: 0.70 (main) | 0.89 (beta) | 0.94 (dev) dartR.popgen 1.0.0 | CRAN: 1.0.0 | Github: 0.32 (main) | 0.88 (beta) | 1.0.3 (dev) dartR.spatial 0.89 | CRAN: 0.78 | Github: 0.78 (main) | 0.89 (beta) | 0.89 (dev) dartR.captive 0.75 | CRAN: 0.75 | Github: 0.75 (main) | 0.93 (beta) | 0.95 (dev) dartR.sexlinked --- | CRAN:1.0.5 | Github: 1.0.5 (main) | 1.0.5 (beta) | 1.0.5 (dev)
Message has been deleted

Paige M.

unread,
Jun 5, 2025, 2:24:15 PMJun 5
to dartR
Hello,
I'm only OK with using dartR but since no one answered - and in case you still need help I'll try.


When I run structure there are no + symbols in my commands.  I use a rstudio on mac.

Example command that works or me - this was a small test run to see if my I could get output for mapping and such:

structure <- gl.run.structure(result,
                              exec = "./structure",
                              noadmix = FALSE,
                              k.range = 2:4,
                              num.k.rep = 2,
                              burnin = 10,
                              numreps = 100,
                              inferalpha = TRUE,
                              delete.files = FALSE)

Since larger data and lots of reps takes a LONG time to run, I would suggest you make a smaller version of your dataset to run. Even if you get it running the output may not be as you wish (I had my lat lon incorrectly formatted for example).

Finally, my last suggestion would be to try to put Structure app directly in your folder.  I never could get it to run correctly when using a path (even though I use paths all the time for other things in rstudio).  I also needed plink in the folder, it was available in the original folder I downloaded with the structure app.  I found that out by reading the Pritchard site for the Structure app.

Good luck!
Reply all
Reply to author
Forward
0 new messages