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.

phonotype_gwas_partitioner(
  pheno_data,
  geno_data,
  joinBy,
  partition_number,
  partitions_save_path
)

Arguments

pheno_data

phenotype data.frame

geno_data

GWAS data frame that contains one ID and SNP columns

joinBy

The character value joinBy is common between pheno_data and geno_data columns.

partition_number

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

partitions_save_path

is the save path of data partitions.

Value