This function creates data partitions for `lmer` modeling. To create data, first we load adnimerge and select specific columns. Then we load the WGS PCA data and select the required columns. In the next step, merge the two datasets into one. Finally, we merge WGS data by `PTID`. Data is melted and created into a tidy version before being used in data.table format.

wgs_adno_partitioner(
  partition_number = 300,
  clinical_variables = c("MMSE", "GENDER", "AGE", "MMSE.bl", "PTEDUCAT", "PTID",
    "VISID"),
  pca_components = c("PC1", "PC2", "PC3"),
  wgs_path,
  pca_path,
  adni_path,
  partitions_save_path,
  fill_col = NULL
)

Arguments

partition_number

is an integer number that represents the number of data is divided.

clinical_variables

character vector contains names of variables in ADNI clinical data.

pca_components

character vector contains names of variables in WGS PCA data.

wgs_path

is path of ADNI WGS data.

pca_path

is path of PCA components WGS data.

adni_path

is path of adnimerge.RData. It must contains clinical_variables columns.

partitions_save_path

is the save path of data partitions.

fill_col

Fills missing values in selected columns using previous entry.

snp_names_save_path

is the save path of SNP names.

Value