load_cellSNP_vcf: Load sparse matrices A and D from cellSNP VCF file with...

View source: R/read_data.R

load_cellSNP_vcfR Documentation

Load sparse matrices A and D from cellSNP VCF file with filtering SNPs

Description

Load sparse matrices A and D from cellSNP VCF file with filtering SNPs

Usage

load_cellSNP_vcf(
  vcf_file,
  min_count = 0,
  min_MAF = 0,
  max_other_allele = NULL,
  rowname_format = "full",
  keep_GL = FALSE
)

Arguments

vcf_file

character(1), path to VCF file generated from cellSNP

min_count

minimum count across all cells, e.g., 20

min_MAF

minimum minor allele fraction, e.g., 0.1

max_other_allele

maximum ratio of other alleles comparing to REF and ALT alleles; for cellSNP vcf, we recommend 0.05

rowname_format

the format of rowname: NULL is the default from vcfR, short is CHROM_POS, and full is CHROM_POS_REF_ALT

keep_GL

logical(1), if TRUE, check if GL (genotype probability) exists it will be returned

Value

A list with elements the matrices A and D and GL, the genotype probability. If keep_GL is false the GL element will be an empty list.

Examples

vcf_file <- system.file("extdata", "cellSNP.cells.vcf.gz",
    package = "cardelino"
)
input_data <- load_cellSNP_vcf(vcf_file)

davismcc/cardelino documentation built on Nov. 19, 2022, 2:44 a.m.