[adegenet-forum] Not working Monmonier

Jombart, Thibaut t.jombart at imperial.ac.uk
Mon Jul 14 11:54:47 CEST 2014


Hi Vojtěch

Monmonier is not designed for spatial distribution with duplicate locations. Problem is, if you jitter the data, you'll get a different boundary every time you run the analysis. 

If you're looking for spatial structures, sPCA may be more useful there.

Cheers
Thibaut


________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vojtěch Zeisek [vojta at trapa.cz]
Sent: 13 July 2014 21:18
To: Adegenet R-Forum
Subject: [adegenet-forum] Not working Monmonier

Hello,
I tried Monmonier analysis as described in Adegent tutorial. I'm not familiar
with that method (for similar question I used IMa2 last time), so I was
curious what it does. :-) I tried with relatively relatively large dataset.
Individuals from one locality usually have same coordinates. The code:
> monmonier <- monmonier(xy=genind$other$xy, dist=dist(genind$tab),
cn=chooseCN(genind$other$xy, ask=FALSE, type=5, d1=0, d2=2.5, plot.nb=FALSE,
edit.nb=FALSE), nrun=1)
Indicate the threshold ('d' for default): d
> coords.monmonier(monmonier)
Error in output[[runname]]$dir1[i, ] <- halfway[which(eval.x == TRUE &  :
  number of items to replace is not a multiple of replacement length
Calls: coords.monmonier
> plot(monmonier)
Warning messages:
1: In arrows(obj$dir1$path[1:(nrow(obj$dir1$path) - 1), 1], obj$dir1$path[1:
(nrow(obj$dir1$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
2: In arrows(obj$dir1$path[1:(nrow(obj$dir1$path) - 1), 1], obj$dir1$path[1:
(nrow(obj$dir1$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
3: In arrows(obj$dir2$path[1:(nrow(obj$dir2$path) - 1), 1], obj$dir2$path[1:
(nrow(obj$dir2$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
4: In arrows(obj$dir2$path[1:(nrow(obj$dir2$path) - 1), 1], obj$dir2$path[1:
(nrow(obj$dir2$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
genind$other$xy contains geographical coordinates in WGS 84 (from GPS). The
only problem coming to my mind are those repetitive coordinates (for
individuals from one locality) - because of that, chooseCN practically allows
only methods 5 and 6. Might be, I could try it with populations, but then I'm
afraid to get little bit different information... Or might be I could add some
little uncertainty to the coordinates...? I was also thinking if it could be
because of missing data, but when I tried with genind object corrected for
missing data, I ended up with same errors. Any ideas?
Sincerely,
Vojtěch

--
Vojtěch Zeisek
http://trapa.cz/en/

Department of Botany, Faculty of Science
Charles University in Prague
Benátská 2, Prague, 12801, CZ
http://botany.natur.cuni.cz/en/

Institute of Botany, Academy of Science
Zámek 1, Průhonice, 25243, CZ
http://www.ibot.cas.cz/en/

Czech Republic


More information about the adegenet-forum mailing list