PlotTransBiasID115ToPdf: Plot transcription strand bias to a PDF file

Description Usage Arguments Value Note Examples

Description

Plot transcription strand bias to a PDF file

Usage

1
PlotTransBiasID115ToPdf(annotated.ID.vcfs, file, pool, damaged.base = NULL)

Arguments

annotated.ID.vcfs

ID vcfs which have been annotated with AnnotateIDVCFsWithTransRanges.

file

The name of output file.

pool

if true, 36 categories will be pooled to 4 categories by removing trinucleotide context. This can be done if the counts of individual categories are too low, to increase power.

damaged.base

One of NULL, "purine" or "pyrimidine". This function allocates approximately equal numbers of mutations from damaged.base into each of num.of.bins bin by expression level. E.g. if damaged.base is "purine", then mutations from A and G will be allocated in approximately equal numbers to each expression-level bin. The rationale for the name damaged.base is that the direction of strand bias is a result of whether the damage occurs on a purine or pyrimidine. If NULL, the function attempts to infer the damaged.base based on mutation counts.

Value

A list whose first element is a logic value indicating whether the plot is successful. The second element is a named numeric vector containing the p-values printed on the plot.

Note

The strand bias statistics are Benjamini-Hochberg q-values based on two-sided binomial tests of the mutation counts on the transcribed and untranscribed strands relative to the actual abundances of C and T on the transcribed strand. On the plot, asterisks indicate q-values as follows *, Q<0.05; **, Q<0.01; ***, Q<0.001.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(ICAMS)
file <- c(system.file("extdata/Strelka-ID-vcf/",
                      "Strelka.ID.GRCh37.s1.vcf",
                      package = "ICAMSxtra"))
ID.vcf <- ICAMS::ReadAndSplitVCFs(file, variant.caller = "strelka")$ID  
if (requireNamespace("BSgenome.Hsapiens.1000genomes.hs37d5", quietly = TRUE)) {
  annotated.ID.vcf <- AnnotateIDVCFsWithTransRanges(ID.vcf, ref.genome = "hg19",
                                      trans.ranges = ICAMS::trans.ranges.GRCh37, 
                                      vcf.names = "Strelka.ID.GRCh37.s1")
  PlotTransBiasID115ToPdf(annotated.ID.vcfs = annotated.ID.vcf,
                           file = file.path(tempdir(), "test.pdf"),
                           pool = TRUE)
}

steverozen/ICAMSxtra documentation built on Feb. 9, 2022, 7:01 a.m.