readVCF4: Read VCF file

Description Usage Arguments Value Examples

View source: R/read_nophase.R

Description

Read ASE from a VCF file

Usage

1
readVCF4(vcf_file)

Arguments

vcf_file

A character. The path to a vcf file. The file must have the REF, ALT and AD fields.

Value

A data.table of allele specific read counts.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Example workflow for documentation

vcff <- system.file("extdata/AD_example.vcf", package = "XCIR")
# Reading functions
vcf <- readRNASNPs(vcff)
vcf <- readVCF4(vcff)

# Annotation functions
# Using seqminer (requires additional annotation files)

anno <- addAnno(vcf)

# Using biomaRt
anno <- annotateX(vcf)
# Do not remove SNPs with 0 count on minor allele
anno0 <- annotateX(vcf, het_cutoff = 0)

# Summarise read counts per gene
# Assuming data is phased, reads can be summed across genes.
genic <- getGenicDP(anno, highest_expr = FALSE)
# Unphased data, select SNP with highest overall expression.
genic <- getGenicDP(anno, highest_expr = TRUE)

XCIR documentation built on Nov. 8, 2020, 7:41 p.m.