SNPRelate icon indicating copy to clipboard operation
SNPRelate copied to clipboard

family information in snpgdsGDS2PED

Open treebreeder opened this issue 4 years ago • 2 comments

How can I translate my .gds into .ped and automatically taking the family information from my gds object which I added before with add.gdsn() ?

Such as from:

  • [ ] |--+ sample.id { Str8 173 LZMA_ra(15.7%), 577B } |--+ snp.id { Int32 17489 LZMA_ra(16.9%), 11.5K } |--+ snp.position { Int32 17489 LZMA_ra(58.1%), 39.7K } |--+ snp.chromosome { UInt8 17489 LZMA_ra(37.7%), 6.4K } |--+ snp.allele { Str8 17489 LZMA_ra(12.9%), 8.8K } |--+ snp.rs.id { Str8 17489 LZMA_ra(0.77%), 141B } |--+ genotype { Bit2 173x17489, 738.7K } * |--+ pop_code { Int32,factor 173, 692B } * --+ fam [ data.frame ] * --+ pop { Int32,factor 173, 692B } *

treebreeder avatar Sep 02 '20 19:09 treebreeder

snpgdsGDS2PED() and snpgdsGDS2BED() do not have such function. But I could consider adding the function in future.

zhengxwen avatar Sep 03 '20 22:09 zhengxwen

I think this would be nice, since it would save some extra work when you have to manipulate the ped file afterwards, although the necessary information is potentially already there! Thanks

treebreeder avatar Sep 04 '20 07:09 treebreeder