genos.clean.batch: Removes badly predicted SNPs by MaCH for all files

Description Usage Arguments Details Author(s) See Also Examples

Description

For all files in dir.ped, does the same thing as pre5.genos2numeric.batch, only leaves genotypes the way they are, without categorizing them into 3 levels. Removes all SNPs that have missing or bad values. Intended to be done after imputation, to ensure consistency. Geno values should use letters A, T, C, G if letter.encoding=TRUE.

Usage

1
2
3
4
genos.clean.batch(dir.ped, dir.dat = dir.ped, dir.out, prefix.ped, prefix.dat, 
key.ped = "", key.dat = "", ending.ped = ".txt", ending.dat = ".dat", 
num.nonsnp.col = 2, num.nonsnp.last.col = 1, letter.encoding = TRUE, 
save.ids.name = "patients.fam")

Arguments

dir.ped

The name of directory that contains all the .ped files.

dir.dat

The name of directory that contains all the .dat files.

dir.out

The name of output directory to which resulting files should be saved.

prefix.ped

The beginning of the file name for the pedegree file (up until chrom number).

prefix.dat

The beginning of the file name for .dat file (up until chrom number).

key.ped

Any keyword in the name of the pedegree file that distinguishes it from other non-pedegree files.

key.dat

Any keyword in the name of the .dat file that distinguishes it from others.

ending.ped

MUST be the filename extension of the pedegree file, including the dot ".". For example, if your file is named "CGEM_2.txt", then set this variable to ".txt"; if your file is named "CGEM_2.ped", then set this variable to ".ped"; if your file is named "CGEM_2", then set this variable to "".

ending.dat

MUST be the extension of the .dat file, including the dot ".".

num.nonsnp.col

The number of leading columns that do not correspond to geno values. Ex. for MaCH1 input file format there are 5 non-snp columns; for MaCH1 output format .mlgeno it is 2; for Plink it is 6.

num.nonsnp.last.col

The number of last columns that do not correspond to geno values. Ex. If last column is the disease status (0s and 1s), then set this variable to 1. If 2 last columns correspond to confounding variables, set the variable to 2.

letter.encoding

Flag whether or not the ecoding used for Alleles is letters (A, C, T, G). If True, then does additional check for Alleles corresponding to the letters, and removes SNPs that contain any other symbols.

save.ids.name

The name of the file to which all patient IDs should be saved.

Details

This function calls genos.clean for all the files in the directory, so that users do not have to call that function as many times as there are chromosomes.

For all the .ped files that start with prefix.ped, contain key.ped, and end with ending.ped in the directory dir.ped; and for similarly obtained .dat files, this function removes all the SNPs that have not been properly imputed by MaCH, making sure that there are no missing/strange values. This function is needed since results of MaCH might contain weird symbols (like '2' can appear instead of A, T, C, G). This is only effective when letter.encoding = True. The reason for calling this function, and not pre5.genos2numeric is because you might wish to call other software packages on the fully imputed data, which will not need the data categorized into 3 levels.

Outputs the following files:

1
2
3
4
5
 <file.ped>_clean<ending.ped> - in dir.out directory, the resultant file:
      the SNP columns + last columns (but no user IDs will be recorded).
 <file.dat>_clean.dat - in dir.out directory, the corresponding .dat file, will 
      be different from original <file.dat> if any bad SNPs get removed.
 <save.ids.name> - the patient IDs, if save.ids.name is not empty "".

Author(s)

Olia Vesselova

See Also

pre3.call.mach, pre5.genos2numeric, pre5.genos2numeric.batch

Examples

1
print("See demo for pre5.genos2numeric()")

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