Open mihuzx opened 4 years ago
Currently- this is not possible as things stand. This functionality could certainly be added- but unsure when I can dedicate some time to it. PRs are welcome.
In the meantime- I would suggest:
gdistkey
argument.Something like this should get you started:
import allel
import zarr
for chrom in chroms:
allel.vcf_to_zarr("my.vcf.gz", "out.zarr", region=chrom, group=chrom, fields="*")
callset = zarr.open_group("out.zarr")
for chrom in chroms:
pos = callset[chrom]["variants/POS"]
genetic_pos = some_function(pos, map)
callset[chrom]["variants"].create_dataset("genetic_position", data=genetic_pos)
Hi hardingnj,
Thank you for your exellent work.
But I wonder if I can use the vcf file as input and use the genetic map at the same time. So that I can sliding window based on genetic map to calculate XP-CLR.
Thank you for your time.