genotypeMatrix: Creates a Genotype Matrix for every variant

Description Usage Arguments Value Examples

View source: R/snpMatrix.R

Description

Creates a Genotype matrix using allele frequcies or by muatation status.

Usage

1
2
3
4
5
6
7
8
genotypeMatrix(
  maf,
  genes = NULL,
  tsb = NULL,
  includeSyn = FALSE,
  vafCol = NULL,
  vafCutoff = c(0.1, 0.75)
)

Arguments

maf

an MAF object generated by read.maf

genes

create matrix for only these genes. Define NULL

tsb

create matrix for only these tumor sample barcodes/samples. Define NULL

includeSyn

whether to include silent mutations. Default FALSE

vafCol

specify column name for vaf's. Default NULL. If not provided simply assumes all mutations are heterozygous.

vafCutoff

specify minimum and maximum vaf to define mutations as heterozygous. Default range 0.1 to 0.75. Mutations above maximum vafs are defined as homozygous.

Value

matrix

Examples

1
2
3
laml.maf <- system.file("extdata", "tcga_laml.maf.gz", package = "maftools")
laml <- read.maf(maf = laml.maf)
genotypeMatrix(maf = laml, genes = "RUNX1")

maftools documentation built on Feb. 6, 2021, 2 a.m.