Learn R Programming

genMOSSplus (version 1.0)

pre1.plink2mach: Convert Plink to MaCH input format

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

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.

See Also

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

Examples

Run this code
print("See the demo 'gendemo'.")

Run the code above in your browser using DataLab