Download PLINK - Psychiatric & Neurodevelopmental Genetics Unit (PNGU)
Transcript
The --merge option must be followed by 2 arguments: the name of the second PED file and the name of the second MAP file. A --recode (or --make-bed, etc) option is necessary to output the newly merged file; in this case, --out option will create the files merge-recode.ped and merge-recode.map. The --merge option can also be used with binary PED files, either as input or output, but not as the second file: i.e. plink --bfile data1 --merge data2.ped data2.map --make-bed --out merge will create merge.bed, merge.fam and merge.bim, as the --make-bed option was used instead of the --recode option. Likewise, the data1.* files point to a binary PED file set. If the second fileset (data2.*) were in binary format, then you must use --bmerge instead of --merge plink --bfile data1 --bmerge data2.bed data2.bim data2.fam --make-bed --out merge which takes 3 parameters (the names of the BED, BIM and FAM files, in that order). The two filesets can either overlap completely, partially, or not at all both in terms of markers and individuals. Imputed genotypes will be set to missing (i.e. if SNP B is not measured in the first file, but it is in the second, then any individuals in the first file who are not also present in the second file will be set to missing for SNP B. By default, any existing genotype data (i.e. in data1.ped) will not be over-written by data in the second file (data2.ped). By specifying a --merge-mode this default behavior can be changed. The modes are: 1 2 3 4 5 6 7 Consensus call (default) Only overwrite calls which are missing in original PED file Only overwrite calls which are not missing in new PED file Never overwrite Always overwrite mode Report all mismatching calls (diff mode -- do not merge) Report mismatching non-missing calls (diff mode -- do not merge) The default (mode 1) behaviour is to call the merged genotype as missing if the original and new files contain different, non-missing calls; otherwise: i.e. data1.ped --------0/0 0/0 A/A A/A , , , , , data2.ped --------0/0 A/A 0/0 A/T -> -> -> -> -> Merge mode 1 2 3 4 5 ----------------------0/0 0/0 0/0 0/0 0/0 A/A A/A A/A 0/0 A/A A/A A/A A/A A/A 0/0 0/0 A/A A/T A/A A/T Modes 6 and 7 effectively provide a means for comparing two PED files – no merging is performed in these cases; rather, a list of mismatching SNPs is written to the file plink.diff They should also report the concordance rate in the LOG file, based on all SNPs that feature in both sets. A warning will be given if the chromosome and/or physical position differ between the two MAP files. NOTE Alleles must be exactly coded to match: that is, PLINK will not assume that a 1,2,3,4 SNP coding maps onto a A,C,G,T coding. You can use the --allele1234 and --alleleACGT commands prior to merging to convert datasets and then merge these consistently coded files (you cannot convert and merge on the fly, i.e. simply do putting --allele1234 on the command line along with --merge will not work: you need to use --allele1234 and --make-bed first). 59