buildAnalysesPlan: Build a plan for data analyses

Description Usage Arguments Value Examples

View source: R/model.R

Description

Long-running jobs are vulnerable to early termination from maintanance or power outages. We recommend chopping your analyses into smaller chunks. This also offers the advantage of running jobs in parallel. This function builds a plan that roughly splits the whole analysis into equal amounts of work.

Usage

1
buildAnalysesPlan(snpData, sliceSize)

Arguments

snpData

a pathway to a file containing GWAS data. The data can be in a variety of forms, such as standard PLINK format (bed/bim/fam), PLINK2 format (pgen/pvar/psam), Oxford format (bgen/sample), or CSV format (csv format in much slower due to the lack of compression for non-binary files).

sliceSize

number of SNPs to analyze per job

Value

Returns a data.frame with one job specification per row with the following columns:

path

Path to the genetic data file

begin

Starting SNP

end

Ending SNP

count

Number of SNPs in this job

slice

Within data file slice index

Examples

1
2
dir <- system.file("extdata", package = "gwsem")
buildAnalysesPlan(file.path(dir,"example.bgen"), 45)

gwsem documentation built on Jan. 18, 2022, 1:09 a.m.