================================= INSTRUCTIONS =============================== This document contains the instructions for installing and using the SkewXCI package in R. Note: please install and use the package under the R (version 3.5.1) environment with 64-bit, otherwise R may report errors and the package cannot work. The SkewXCI package will use the R packages "nleqslv" and "rootSolve". Therefore, make sure that these packages have been installed. 1. Install Connect the computer to the internet and choose a CRAN mirror. Then, run the following command in R >install.packages(pkgs="nleqslv") to install the R package "nleqslv". >install.packages(pkgs="rootSolve") to install the R package "rootSolve". For Windows users, download the compiled R package file ("SkewXCI_0.1.0.zip") for Windows. Then, use the following command in R to install the package >install.packages(pkgs="SkewXCI_0.1.0.zip",repos=NULL,type="binary") For Linux and Unix users, download the compiled R package file ("SkewXCI_0.1.0.tar.gz") for Linux and Unix. Then, use the following command in R to install the package >install.packages(pkgs="SkewXCI_0.1.0.tar.gz",repos=NULL,type="source") 2. Use Use >library(SkewXCI) >?SkewXCI to read the help file. 3. Example >SkewXCI(ped) # run the SkewXCI package for the two SNPs in the ped file $`gamma` rs123456_1 rs123457_1 0.616424 1.607076 $LR Chi2 Pvalue CI rs123456_1 1.694930 0.192952 (0,1.183723) rs123457_1 1.229207 0.267561 (0.412012,2) $Fieller Z Pvalue CI rs123456_1 -1.302288 0.192818 (0,1.183871) rs123457_1 1.108437 0.267673 (0.409708,2) $delta Z Pvalue CI rs123456_1 -1.193899 0.232517 (0,1.246121) rs123457_1 1.052575 0.292536 (0.47666,2) >SkewXCI(ped,Z=Z) # run the SkewXCI package for the two SNPs in the ped file by adjusting for the covariates in the Z file $`gamma` rs123456_1 rs123457_1 0.606900 1.569888 $LR Chi2 Pvalue CI rs123456_1 1.806973 0.178872 (0,1.170394) rs123457_1 1.105549 0.293052 (0.374506,2) $Fieller Z Pvalue CI rs123456_1 -1.344618 0.178749 (0,1.170538) rs123457_1 1.051249 0.293144 (0.37216,2) $delta Z Pvalue CI rs123456_1 -1.229445 0.218905 (0,1.233575) rs123457_1 1.005870 0.314478 (0.459446,2) 4. Arguments ped the name of a standard pedigree file or a matrix/dataframe containing pedigree relationship, genotype and phenotype information, one row for each individual. The first 5 columns give the pedigree id, individual id, father id (0 if founder), mother id (0 if founder), and sex (1 = male, 2 = female, 0 = unknown), in that order. Note that these fields need to be numeric. The 6th column gives the affection status (1 = unaffected, 2 = affected, 9 = unknown). The remaining columns code for marker genotypes (2 columns per SNP), with the two alleles for each marker represented by two consecutive numbers 1 and 2 (0 = missing). loci.test a vector containing the names of the loci that are tested. The default value is "ALL" which means that all the SNPs are tested. Z the name of a standard delimited file or a matrix/dataframe (non-empty) which contains covariates needed to be adjusted. The first 5 columns give the pedigree id, individual id, father id (0 if founder), mother id (0 if founder), and sex (1 = male, 2 = female, 0 = unknown), in that order. The remaining columns are covariates (NA = unknown). gamma_0 a number within the interval [0, 2], indicating the true value of the sknewness of XCI under the null hypothesis. The default value is 1 (random XCI). alpha the significance level for the hypothesis testing. The confidence level is 1-alpha. The default value is 0.05. header the header of the input data file. If ped contains variable names, header is taken as TRUE; otherwise, header is taken as FALSE. The default value is FALSE. digits an integer indicating the number of decimal places or significant digits to be used. The default value is 6. 5. Values gamma the value of the point estimate. LR the value of the test statistic, the p value and the corresponding confidence interval based on the likelihood ratio method. Fieller the value of the test statistic, the p value and the corresponding confidence interval based on the Fieller's method. delta the value of the test statistic, the p value and the corresponding confidence interval based on the delta method. 6. References Peng Wang, Yu Zhang, Bei-Qi Wang, Jian-Long Li, Yi-Xin Wang, Dongdong Pan, Xian-Bo Wu, Wing Kam Fung and Ji-Yuan Zhou. A statistical measure for the skewness of X chromosome inactivation based on case-control design. 2018 (submitted) ----------------------------------------------------------------- If you have any questions, please email Dr. Ji-Yuan Zhou at zhoujiyuan5460@hotmail.com