pre1.plink2mach: Convert Plink to MaCH input format

Description Usage Arguments Details Note Author(s) See Also Examples

Description

Provided with Plink-format files file.ped and file.map in dir.in, this function re-formats it into MACH pedigree (file.ped) and data (file.dat) file formats, and saves the reformatted files in dir.out.

Usage

1
pre1.plink2mach(file.ped = "", file.map = "", dir.in, dir.out)

Arguments

file.ped

The name of the pedegree file. This file should be in Plink format:

 p1    p1    0       0       1       2       C/C     N/N     T/C ...
 p2    p2    0       0       1       2       T/T     A/C     G/G ...
 ...

   - Tab separated
   - No header
   - 6 non-SNP leading columns
   - Col 1 and Col 2: patient ID: some unique ID
   - Col 3 and Col 4: parents: mother/father: can be set to 0
   - Col 5: gender, 1 - male, and 2 - female
   - Col 6: disease status: 1 CONTROL and 2 CASE
   - Col 7+: geno information, slash separator between alleles.
file.map

The name of the .map input file. This file should contain names of SNPs in the following format:

 19 rs32453434 0 5465475
 19 rs6547434 0 23534543
 ...

   - Space separated
   - No header
   - 4 columns:
   - Col 1: Chromosome number
   - Col 2: SNP ID or any other marker for SNP
   - Col 3: genetic distance (can be set to 0)
   - Col 4: physical locations (can be set to 0)
   - Number of rows is the number of SNPs used in the given 
       chromosome. (= number of SNP columns of .ped)
dir.in

The directory where file.ped and file.map can be found.

dir.out

The directory to which output .ped and .dat files should go.

Details

This function converts from Plink to MaCH input format. There is no need to specify both file.ped and file.map; so one of them can be an empty string (""), in which case, this file will not be processed. So that you can use this function to do ONLY PED files but not map, and vice versa.

Note

Note: the function does NOT change unknown Allele values from "0" to "N", as MACH program can use either. Does NOT recode gender to "M" and "F", since MaCH1 doesn't care, but further file processing interprets "F" as "FALSE".

Author(s)

Olia Vesselova

See Also

pre1.plink2mach.batch, pre0.dir.create, pre2.remove.genos, pre2.remove.genos.batch

Examples

1
print("See the demo 'gendemo'.")

Example output

[1] "See the demo 'gendemo'."

genMOSSplus documentation built on May 1, 2019, 10:31 p.m.