knitr::opts_chunk$set(echo = TRUE) library('tLOH') library('purrr') library('dplyr') library('GenomicRanges') library('VariantAnnotation')
v1.5.6
tLOH: Assessment of evidence for loss of heterozygosity in spatial transcriptomics pre-processed data using Bayes factor calculations.
This tool requires data produced with the 10X Genomics Visium Spatial Gene Expression platform and processed to obtain a VCF with per-cluster allele count information at heterozygous SNP positions. The purpose of this R package is to perform Bayes calculations on the data from the VCF and plot the results. Examples of how to run this tool are below:
exampleData <- tLOHDataImport('../inst/extdata/Example.vcf') # The VCF file in inst/extdata must be decompressed before running this command
load("../data/humanGBMsampleAC.rda") df <- tLOHCalc(humanGBMsampleAC) head(df)
The column descriptions for the output dataframe are as follows - CHR: chromosome POS: position REF: reference allele counts ALT: alternative allele counts TOTAL: total counts p(D|het): probability of data given heterozygous event p(D|loh): probability of data given loh event p(het|D): probability of data given heterozygous event divided by the addition of p(D|het) and p(D|loh) p(loh|D): probability of data given loh event divided by the addition of p(D|het) and p(D|loh) bayesFactors: Bayes factor value K inverseBayes: 1/K LogBayesFactors: log of Bayes factor K LogInverseBayes: log of 1/K Log10BayesFactors: log 10 of Bayes factor K Log10InverseBayes: log 10 of 1/K AF: allele fraction Cluster: cluster number Cluster_AF: cluster + AF for plotting y axis CHR_F: chromosome factor
alleleFrequencyPlot(df, "Example") aggregateCHRPlot(df, "Example")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.