Why does write.ped remove the first locus?
0
0
Entering edit mode
2.5 years ago

In order to get a VCF file from genind, I am going through hierfstat function write.ped() and then with plink I convert the result to vcf. This is my code (apologies, but I cannot provide a reproducible data for this particular scenario):

hierfstat_object <- genind2hierfstat(genind_object)
pop <- hierfstat_object$pop
inds <- rownames(hierfstat_object)
rownames(hierfstat_object) <- NULL
hierfstat_object <- dplyr::select(hierfstat_object, -pop)
write.ped(hierfstat_object, ilab = inds, pop = pop, fname = "path/to/file")

And then in bash with plink:

$ plink --file Ped_map_file --recode vcf --out VCF_file --allow-extra-chr

Problem is, when I inspect the PED and MAP objects that R created, the first locus is removed, for no apparent reason. Does anyone know about this behaviour and how to solve it?

Thank you

ped plink hierfstat vcf genetics • 433 views
ADD COMMENT

Login before adding your answer.

Traffic: 1506 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6