[adegenet-forum] convert two columns per locus data frames into one column with separator for import to genind

Nevil Amos nevil.amos at gmail.com
Mon Jan 2 18:14:07 CET 2012


I have a heap of genotypes  in text files arranged with two columns per 
locus ( they are diploid)

How can I quickly import and format these as one column per locus  given 
the number of loci varies

alternatively is it possible to import the tow column per locus table as 
geno into genind directly?


ie

my data is formatted
   BMC3_1 BMC3_2 Cpi4_1 Cpi4_2 epic23989s_1 epic23989s_2
1     98    106    286    288          284          284
2    116    116    284    308          286          286
3    108    116    302    304          286          288
4    106    118    288    302          286          286
5     98     98    294    304          284          286
6     98    120    284    312          282          284


and needs to be:
   BMC3         Cpi4         epic23989s
1     98 /106    286/288          284/284
2    116/116    284/308          286/286
3    108/116    302/304          286/288
4    106/118    288/302          286/286
5     98/98    294/304          284/286
6     98/120    284/312          282/284

in order to import into genind object

cheers

Nevil Amos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20120103/f1469b2e/attachment.htm>


More information about the adegenet-forum mailing list