getGenicDP {XCIR} | R Documentation |
Calculate allele specific expression for each gene in each sample, either using only the most expressed SNP or using all SNPs (when phasing has been performed).
getGenicDP(dt_anno, highest_expr = TRUE, pool = FALSE, gender_file = NULL)
dt_anno |
A |
highest_expr |
A |
pool |
A |
gender_file |
A |
A data.table
. That should be used as input for
betaBinomXI
.
betaBinomXI, addAnno
# 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)