[adegenet-forum] importing data NA coding

Evelyne Heyer heyer at mnhn.fr
Wed May 25 19:08:03 CEST 2011


Dear Thibault,
For me the "000000" are recoded as blank, not NA

xx <-read.genepop("test_adegene.gen",missing=0,quiet=FALSE)
genind2df(xx)

***************
Extract of the input file:
*******************
Asie Centrale avec Turkmen 26 microsat P enlevé
P2, P34, P35, P36, P37, P6, P38, P8, P9
pop
KAZ01,        124124    187187    218224    190190    229229    
134134    184184    144144    206210
KAZ02,        115124    202202    218218    184188    233233    
132140    184184    144152    206214
KAZ03,        121121    187190    218222    184184    233233    
128128    184206    144156    206206
KAZ04,        115124    190190    218218    172186    229235    
128132    184200    140144    200210
KAZ05,        121121    187196    218218    168198    235239    
136144    184184    144160    204206
KAZ06,        115121    190190    216218    168178    229233    
128128    186200    144152    206210
KAZ07,        115115    202205    214216    168168    233233    
128132    184200    000000    204206
KAZ08,        115121    187187    218218    168190    233233    
136136    184206    144144    208208
KAZ09,        115121    187205    218220    000000    231233    
128132    184188    140144    204210
KAZ11,        118124    187190    216218    000000    000000    
132132    184202    144148    196196
KAZ12,        115118    187190    218222    000000    231235    
132136    184186    140144    196210
KAZ13,        112115    187202    218218    168184    229229    
128132    184184    140144    202206
*******************
Results
         pop     P2    P34    P35    P36    P37     P6    P38     P8     P9
KAZ01 KAZ13 124124 187187 218224 190190 229229 134134 184184 144144 206210
KAZ02 KAZ13 115124 202202 218218 184188 233233 132140 184184 144152 206214
KAZ03 KAZ13 121121 187190 218222 184184 233233 128128 184206 144156 206206
KAZ04 KAZ13 115124 190190 218218 172186 229235 128132 184200 140144 200210
KAZ05 KAZ13 121121 187196 218218 168198 235239 136144 184184 144160 204206
KAZ06 KAZ13 115121 190190 216218 168178 229233 128128 186200 144152 206210
KAZ07 KAZ13 115115 202205 214216 168168 233233 128132 184200        204206
KAZ08 KAZ13 115121 187187 218218 168190 233233 136136 184206 144144 208208
KAZ09 KAZ13 115121 187205 218220        231233 128132 184188 140144 204210
KAZ11 KAZ13 118124 187190 216218               132132 184202 144148 196196
KAZ12 KAZ13 115118 187190 218222        231235 132136 184186 140144 196210
KAZ13 KAZ13 112115 187202 218218 168184 229229 128132 184184 140144 202206





Le 25/05/2011 18:53, Jombart, Thibaut a écrit :
> Dear Evelyne,
>
> "0000" are well interpreted as NAs when reading nancycats data in genpop format.
>
> The head of the file reads:
> #######################
> Genotypes of cats from 17 colonies of Nancy (France)
> fca8
> fca23
> fca43
> fca45
> fca77
> fca78
> fca90
> fca96
> fca37
> Pop
> 1, 0000 0409 0404 0103 0909 0306 0909 0808 1010
> 1, 0000 0909 0407 0305 0909 0306 0209 0808 1010
>
> #######################
>
> Import into R:
> #######################
>> example(read.genepop)
> [...]
>> genind2df(obj)
>      pop fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96 fca37
> 1     1<NA>   0409  0404  0103  0909  0306  0909  0808  1010
> 2     1<NA>   0909  0407  0305  0909  0306  0209  0808  1010
> #######################
>
> If you are using an outdated version of adegenet, please try with the latest stable version. If the problem persist, can you please send me an example data file so that I can try to reproduce and fix the issue?
>
> Cheers
>
> Thibaut
>
> ________________________________________
> From: adegenet-forum-bounces at r-forge.wu-wien.ac.at [adegenet-forum-bounces at r-forge.wu-wien.ac.at] on behalf of Evelyne Heyer [heyer at mnhn.fr]
> Sent: 25 May 2011 13:53
> To: adegenet-forum at r-forge.wu-wien.ac.at
> Subject: [adegenet-forum] importing data NA coding
>
> When I import data from Genepop file with the read.genepop function, the
> missing data frrom Genepop ("0000" allele) are not coded as NA in
> genpop. How to solve this problem?
> Evelyne Heyer
>
>
> _______________________________________________
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>
>


-- 
_________________________________
Pr Evelyne Heyer
Dir adjoint du département Hommes, Natures, Sociétés
UMR 7206 Eco-anthropologie
Equipe "génétique des populations humaines"
CP 139
57 rue Cuvier
75231 Paris Cedex 05
tel: 33 1 40 79 81 58
fax: 33 1 40 79 32 31

En Français http://www.ecoanthropologie.cnrs.fr/spip.php?article291
In English  http://www.ecoanthropologie.cnrs.fr/spip.php?article300




More information about the adegenet-forum mailing list