Learn R Programming

GRAB (version 0.2.2)

getTempFilesFullGRM: Make temporary files to be passed to function getSparseGRM.

Description

Make temporary files to be passed to function getSparseGRM. We strongly suggest using parallel computing for different partParallel.

Usage

getTempFilesFullGRM(
  PlinkFile,
  nPartsGRM,
  partParallel,
  gcta64File,
  tempDir = NULL,
  subjData = NULL,
  minMafGRM = 0.01,
  maxMissingGRM = 0.1,
  threadNum = 8
)

Value

A character string message indicating the completion status and location of the temporary files.

Arguments

PlinkFile

a path to PLINK files (without file extensions of bed/bim/fam). Note that the current version (gcta_1.93.1beta) of gcta software does not support different prefix names for bim, bed, and fam files.

nPartsGRM

a numeric value (e.g. 250): GCTA software can split subjects to multiple parts. For UK Biobank data analysis, it is recommended to set nPartsGRM=250.

partParallel

a numeric value (from 1 to nPartsGRM) to split all jobs for parallel computation.

gcta64File

a path to GCTA program. GCTA can be downloaded from link.

tempDir

a path to store temp files to be passed to getSparseGRM. This should be consistent to the input of getSparseGRM. Default is system.file("SparseGRM", "temp", package = "GRAB").

subjData

a character vector to specify subject IDs to retain (i.e. IID). Default is NULL, i.e. all subjects are retained in sparse GRM. If the number of subjects is less than 1,000, the GRM estimation might not be accurate.

minMafGRM

Minimal value of MAF cutoff to select markers (from PLINK files) to make sparse GRM. (default=0.01)

maxMissingGRM

Maximal value of missing rate to select markers (from PLINK files) to make sparse GRM. (default=0.1)

threadNum

Number of threads (CPUs) to use.

Details

  • Step 1: Run getTempFilesFullGRM to get temporary files.

  • Step 2: Run getSparseGRM to combine the temporary files to make a SparseGRMFile to be passed to GRAB.NullModel.

Examples

Run this code
## Please check help(getSparseGRM) for an example.

Run the code above in your browser using DataLab