Learn R Programming

GRAB (version 0.2.4)

GRAB.getGenoInfo: Get allele frequency and missing rate information from genotype data

Description

This function shares input as in function GRAB.ReadGeno, please check ?GRAB.ReadGeno for more details.

Usage

GRAB.getGenoInfo(
  GenoFile,
  GenoFileIndex = NULL,
  SampleIDs = NULL,
  control = NULL
)

Value

A data frame containing marker information with allele frequencies and missing rates. The data frame includes columns from marker information (CHROM, POS, ID, REF, ALT, etc.) plus additional columns:

altFreq

Alternative allele frequency (before genotype imputation)

missingRate

Missing rate for each marker

Arguments

GenoFile

a character of genotype file. See Details section for more details.

GenoFileIndex

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

SampleIDs

a character vector of sample IDs to extract. The default is NULL, that is, all samples in GenoFile will be extracted.

control

List of control parameters with the following options:

  • AlleleOrder: Allele order in genotype file. Options: "ref-first", "alt-first", or NULL (default: "alt-first" for BGEN, "ref-first" for PLINK).

  • Marker Selection:

    • AllMarkers: Set to TRUE (default) to analyze all markers. Automatically set to FALSE if any include/exclude files are provided.

    • IDsToIncludeFile: Path to file with marker IDs to include.

    • RangesToIncludeFile: Path to file with genomic ranges to include. Can be used with IDsToIncludeFile (union will be used).

    • IDsToExcludeFile: Path to file with marker IDs to exclude.

    • RangesToExcludeFile: Path to file with genomic ranges to exclude. Can be used with IDsToExcludeFile (union will be excluded).

    • Note: Cannot use both include and exclude files simultaneously.