--update-cm

1,226 views
Skip to first unread message

Brendan Bulik-Sullivan

unread,
Jun 10, 2014, 1:19:46 PM6/10/14
to plink2...@googlegroups.com
If you run --update-cm and your original .bim file contains SNPs that are not in your file with genetic coordinates, the CM coordinate for these SNPs is currently set to zero by plink.

It would be nice to have an option to instead interpolate the genetic coordinates for these SNPs (e.g., if SNPs 1 and 3 have genetic coordinates and SNP 2 doesn't, but SNP 2 is halfway between 1 and 3 in terms of physical position, fill in the genetic coordinate for 2 with something halfway in-between the genetic coordinates for 1 and 3)

Christopher Chang

unread,
Jun 10, 2014, 1:28:24 PM6/10/14
to plink2...@googlegroups.com
The new --cm-map flag provides one way to do this.

Brendan Bulik-Sullivan

unread,
Jun 29, 2014, 6:19:52 AM6/29/14
to plink2...@googlegroups.com
Thanks!

Related question -- is there any way to use --cm-map with .bim files without the corresponding .bed/.fam files? 

Christopher Chang

unread,
Jun 30, 2014, 8:02:25 AM6/30/14
to plink2...@googlegroups.com
This wouldn't be difficult to add, but it would be a strange exception to how plink normally works.

Christopher Chang

unread,
Jul 19, 2014, 4:08:42 PM7/19/14
to plink2...@googlegroups.com
The 19 Jul development build supports this type of functionality:

plink --bim [.bim filename] --cm-map [...] --make-just-bim --out [...]

Meanwhile, I've put a warning in the documentation re: the ease of shooting yourself in the foot with --make-just-bim; hopefully it's strong enough.

Massimiliano Cocca

unread,
Sep 17, 2014, 5:46:55 PM9/17/14
to plink2...@googlegroups.com
Hi,
more on this topic, I noticed that after using --cm-map I get negative values. This happens when I have sites which have a smaller chromosome position than the first entry from the 1000G chromosome genetic map in SHAPEIT format: this happens because I'm using my own WGS data. Do you reckon those negative values should all be set to zero? Or do you have any suggestion on this?

many thanks
Max

Massimiliano Cocca

unread,
Sep 17, 2014, 6:05:06 PM9/17/14
to plink2...@googlegroups.com
After further checks I noticed that I don't have the same issue with all chromosomes: on chromosomes 7 and 8, for example, I have several variants placed before the first entry on the genetic map, but those are updated with zeros.
The "problem" seems to affect only chr 2,3,16,18,19 and 21.

thanks
Max

Christopher Chang

unread,
Sep 17, 2014, 6:57:08 PM9/17/14
to plink2...@googlegroups.com
What matters is the differences between the centimorgan coordinates, not the actual values, so negative values should not be a problem.  (Just make sure that, when merging multiple datasets, you don't end up with some variants using one cm coordinate system and some variants using another one.)

henry

unread,
Apr 21, 2015, 7:53:28 AM4/21/15
to plink2...@googlegroups.com
Dear Christopher,

I can't seem to get --cm-map working using 'PLINK v1.90p 64-bit (18 Apr 2015)'. I am trying to convert a gzipped vcf to a tped file with updated coordinates from a SHAPEIT formatted genetic map. I been trying a variety of commands such as ...

plink --vcf $VCF --cm-map genetic_map_chr16_combined_b37.txt 16 \
         --recode 01 transpose --output-missing-genotype M --out $OUTPUT \
         --set-missing-var-ids @:#

but continuously get zeros for where the CM coordinate should be in the tped file. I have made sure the chromosome code is the same for the --cm-map argument and the vcf. I am using VCFv4.1. I have also tried converting the vcf first to binary ped then trying the --cm-map command and this provided the same output. Any advice or help with this greatly appreciated! I hope you are well.

Christopher Chang

unread,
Apr 21, 2015, 9:35:09 AM4/21/15
to plink2...@googlegroups.com
Hi,

Can you send me a set of files I can use to reproduce what you're seeing?

henry

unread,
Apr 22, 2015, 6:35:35 AM4/22/15
to plink2...@googlegroups.com
Ai. I was making a silly mistake. It works fine. Thank you!
Reply all
Reply to author
Forward
0 new messages