Learn R Programming

GRAB (version 0.2.2)

TestforBatchEffect: Quality control to check batch effect between study cohort and reference population.

Description

This function performs quality control to test for the batch effect between a study cohort and a reference population. And fit a weighted null model.

Usage

TestforBatchEffect(
  objNull,
  data,
  GenoFile = NULL,
  GenoFileIndex = NULL,
  Geno.mtx = NULL,
  SparseGRMFile = NULL,
  RefAfFile,
  OutputFile,
  IndicatorColumn,
  SurvTimeColumn,
  SampleIDColumn
)

Value

A dataframe of marker info and reference MAF.

Arguments

objNull

a WtCoxG_NULL_Model object, which is the output of GRAB.NullModel.

data

a data.frame, list or environment (or object coercible by as.data.frame to a data.frame), containing the variables in formula. Neither a matrix nor an array will be accepted.

GenoFile

A character string of the genotype file. See Details section for more details.

GenoFileIndex

Additional index file(s) corresponding to GenoFile. See Details section for more details.

Geno.mtx

A matrix of genotype data. If provided, it will be used instead of GenoFile. The matrix should have samples in rows and markers in columns.

SparseGRMFile

a path to file of output to be passed to GRAB.NullModel.

RefAfFile

A character string of the reference file. The reference file must be a txt file (header required) including at least 7 columns: CHROM, POS, ID, REF, ALT, AF_ref, AN_ref.

OutputFile

A character string of the output file name. The output file will be a txt file.

IndicatorColumn

A character string of the column name in data that indicates the case-control status. The value should be 0 for controls and 1 for cases.

SurvTimeColumn

A character string of the column name in data that indicates the survival time.

SampleIDColumn

A character string of the column name in data that indicates the sample ID.