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
.
pre1.plink2mach(file.ped = "", file.map = "", dir.in, dir.out)
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.
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)
file.ped
and file.map
can be found.
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. pre1.plink2mach.batch
, pre0.dir.create
,
pre2.remove.genos
, pre2.remove.genos.batch
print("See the demo 'gendemo'.")
Run the code above in your browser using DataLab