Issues with latlong data

176 views
Skip to first unread message

Av U

unread,
Oct 7, 2021, 9:58:48 PM10/7/21
to dartR
Hi

I'm trying to use my latlong data to produce an interactive map and to run the gl.dist.ind command. My data loads into the Genlight but then I can't get the other functions to work and get the following error message:

> gl.map.interactive(ltk)
Error in centers[, "lon"] : incorrect number of dimensions

and
> gl.dist.ind(ltk, method="euclidean")
Starting gl.dist.ind 
  Processing a SNP dataset
  Calculating Euclidean Distances between individuals
Completed: gl.dist.ind 
    T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61 T61
T61   0                                                                                                                                                        
T61   0   0                                                                                                                                                    
T61   0   0   0                                                                                                                                                
etc.

My metadata file is simple: "ind", "lon", "lat". I copied the set uop from the koalas_loc.csv file. 

ANy help would be great.
Avril

Bernd.Gruber

unread,
Oct 7, 2021, 10:35:07 PM10/7/21
to da...@googlegroups.com

Hi Avril

 

Somehow the lat long data seems to be incorrect. Can you try

 

 

itk@other$latlon and check how this look likes. Should be a data.frame with coordinates in lat lon for all individuals.

 

And can you check that you have a population defined in your genlight object.

 

e.g.

 

table(pop(ltk))

 

 

Can you paste the results here so I can have a look at it.

 

 

Cheers,Bernd

 

 

 

Ps. If possible could send me your data set (happy to have it truncated in terms of loci data, e.g.

 

#only the first 10 loci, but all individual meta data.

saveRDS(ltk[, 1:10], file=“ltk.rda”) and send it to me.

--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/f96a6535-dae2-480e-be19-01ecd5199a03n%40googlegroups.com.

Av U

unread,
Oct 7, 2021, 11:38:24 PM10/7/21
to dartR
Hi Bernd

Outputs below.  I haven't assigned populations yet (very messy dataset of tissue and scats!) so it only has 1 assigned population. Shouldn't matter for comparing individuals though?

Data files attached as requested.

cheers
Avril


> ltk@other$latlon 
             lat      lon
T105   -17.31763 145.4543
T35    -17.60905 145.5612
T01    -17.33889 145.6247
T02    -17.51729 145.5959
T03    -17.50534 145.5812
T04    -17.44564 145.4782
T05    -17.33430 145.6418
T06    -17.42637 145.5110
T07    -17.36311 145.6423
T08    -17.53904 145.5158
T09    -17.50414 145.6269
T11    -17.46705 145.4781
T12    -17.30846 145.6197
T13    -17.33992 145.6174
T14    -17.33100 145.5060
T15    -17.58677 145.5809
T16    -17.56318 145.6254
T17    -17.52107 145.5131
T20    -17.53932 145.5300
T21    -17.53932 145.5300
T22    -17.44615 145.4768
T23    -17.48593 145.4734
T24    -17.45452 145.5971
T25    -17.46520 145.5146
T26    -17.39523 145.5977
T27    -17.45931 145.4734
T28    -17.58807 145.5980
T29    -17.32084 145.4959
T30    -17.43291 145.5028
T31    -17.39429 145.5964
T32    -17.41778 145.5376
T33    -17.50835 145.5336
T34    -17.45821 145.4376
T37    -17.54142 145.5150
T38    -17.44198 145.4823
T39    -17.41185 145.5192
T40    -17.43718 145.6012
T41    -16.63986 145.5613
T42    -17.43265 145.5019
T43    -17.33657 145.4997
T44    -17.51886 145.5616
T45    -17.28526 145.5735
T46    -17.47745 145.4838
T47    -17.45841 145.4699
T48    -17.42214 145.4887
T49    -17.31861 145.5536
T50    -17.45338 145.5990
T51    -17.61214 145.5879
T53    -17.43771 145.5399
T54    -17.42826 145.5157
T55    -17.42881 145.5151
T56    -17.39555 145.5985
T57    -17.28414 145.5789
T58    -17.42855 145.5154
T59    -17.38266 145.6109
T60    -17.42797 145.5160
T61    -17.38765 145.6086
T62    -17.35896 145.6370
T63    -17.38968 145.6070
T64    -17.39068 145.6071
T65    -17.38186 145.6085
T66    -17.39008 145.6053
T67    -17.39541 145.5983
T68    -17.39519 145.5978
T70    -17.44924 145.5012
T71    -17.44917 145.5012
T72    -17.37635 145.6636
T73    -17.46106 145.4748
T74    -17.30177 145.6217
T75    -17.47155 145.5844
T76    -17.32047 145.5892
T77    -17.43230 145.5009
T78    -17.41900 145.6077
T79    -17.44805 145.5004
T80    -17.51848 145.5784
T81    -17.41172 145.5188
T82    -17.32791 145.4995
T83    -17.31008 145.6276
T84    -17.34306 145.6299
T85    -17.60905 145.5612
T86    -17.56144 145.6195
T87    -17.45549 145.4652
T89    -17.28457 145.5070
T92    -17.24420 145.6399
T93    -17.38191 145.6556
T94    -17.41331 145.5488
T95    -17.50746 145.5223
T96    -17.56121 145.5198
528    -17.45646 145.4810
532    -17.28647 145.5731
540    -17.46395 145.4903
541    -17.46395 145.4903
553    -16.58632 145.2981
16_01A -17.44821 145.5494
17_02  -17.43345 145.5120
17_08A -17.42920 145.5185
17_17  -17.35709 145.5875
17_18  -17.35708 145.5874
17_21B -17.33913 145.6243
17_25  -17.33856 145.6235
17_33  -17.45103 145.5006
17_43  -17.30224 145.5839
17_44  -17.34060 145.6228
17_53  -17.35495 145.6342
D490s  -17.51308 145.5425
DA452s -17.33077 145.4999
Kimby  -17.35478 145.5862
s101   -17.31572 145.4942
s109   -17.43122 145.6025
REX    -16.64647 145.5649
T102   -17.54614 145.5137
T103   -17.51623 145.5138
T200   -16.82661 145.6545
> table(pop(ltk))

pop1 
 113 
>

ltk.rda
metamtlewis.csv

Bernd.Gruber

unread,
Oct 8, 2021, 12:08:05 AM10/8/21
to da...@googlegroups.com

Hi Avril,

 

Your file seems to work for me.

 

Maybe you need to upgrade to our betaVersion (the tested version on github)

 

Can you check

 

packageVersion(“dartR”)

 

if 1.9.9.1 then most likely better to upgrade to 2.3.3 via

 

 

gl.install.vanila.dartR(flavour=’dev’)

 

 

 

 

here is what I used

 

 

ltk <- readRDS("d:/temp/kkk/ltk.rda")

gl.map.interactive(ltk)

 

and the map looks like it could be koalas:

 

 

Cheers, Bernd

 

Reply all
Reply to author
Forward
0 new messages