Learn R Programming

genMOSSplus (version 1.0)

pre7.add.conf.var: Append confounding variables

Description

Appends confounding variables listed in file.conf to the end of the file.name, right before the disease status (last) column. The output will contain only the patients for which confounding variables exist (other patients will be omitted), so new family file will be written.

Usage

pre7.add.conf.var(file.name, dir.file, file.fam, dir.fam = dir.file, file.conf, dir.conf = dir.file, file.out, fam.out = file.fam, dir.out)

Arguments

file.name
The name of the data file. The format of this file should have last column as the disease status, tab separated, no header.
dir.file
The name of directory where file.name can be found.
file.fam
The name of the family file. Format: one column - one patient ID per line.
dir.fam
The name of directory where file.fam can be found.
file.conf
The name of the file that contains confounding variable information. The file should be in the following format:
    patientID1 1       2 ...
    patientID2 3       1 ...
    patientID3 2       2 ...
    ...

- Column 1: patient ID, exactly the same names should appear in file.fam; * order does not matter; * some patients may be missing; * no new patients should appear in file.conf (if they don't exist in file.fam) - Column 2: the confounding variable must have no more than 3 different values. - Other columns are optional, may be included if there are more confounding variables (3 categories each) - No header - Tab separated - No missings or NAs

dir.conf
The name of directory where file.conf can be found.
file.out
The name of the output file, which will contain all information of file.name, plus confounding variables, only for the patients mentioned in file.conf.
fam.out
The name of the family output file.
dir.out
The name of directory to which file.out and fam.out should be saved.

See Also

pre6.merge.genos, pre7.add.conf.var.unix, pre8.split.train.test, pre8.split.train.test.batch

Examples

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

Run the code above in your browser using DataLab