pedToHaplin(indata, outdata, merge = F, na.strings = "0", sep,
colnames.out = F)
indata
file, they must be merged (with the ";" separator) in the outdata
file. This is done by setting merge = TRUE
. Otherwise, it must be set to FALSE
.indata
. It is passed directly to R's read.table
indata
. If unspecified, any white space will be used, as in read.table
.outdata
file to make it more readable. NOTE: Haplin does currently not use colnames, so this should be set to FALSE when producing the file to run on.outdata
file is written to disk. pedToHaplin
returns (invisibly) the converted data file.
pedToHaplin
before using it.merge = TRUE
to merge them in the output file. If they are already joined in single columns, for instance as CT or C;T, merge
should be set to FALSE
(default).Additional covariates can be included in the input file. If so, they should be placed after the 6 leading columns but before the genetic data. In this case, one should make sure the genetic data columns are already merged, and that merge = FALSE
. (The merge = TRUE
option when covariates are present will hopefully be implemented at some point...)
Note that the output file usually has three columns before (to the left of) the columns containing genetic data. These columns are family id, sex, and casetype. When running haplin on the output file one should specify the argument 'n.vars = 3' in haplin. If the data are from the x chromosome the haplin arguments should also include 'sex = 2' and 'xchrom = T'. Similarly, if the casetype variable is a case-control indicator one should use the argument 'ccvar = 3'. If the intention is to only run haplin on the cases the case triads should be saved separately in a new file prior to running haplin on it.
haplin
## Not run:
#
# # Standard run on supplied test file:
# pedToHaplin("test_pedToHaplin.ped", outdata = "test_pedToHaplin_result.txt",
# colnames.out = F, merge = T)
#
# ## End(Not run)
Run the code above in your browser using DataLab