PlotPSI.A5SS.Pos: Plot percent spliced-in (PSI) values for alternative 5'...

View source: R/Script_01_7_PlotPSI_A5SS_PositiveStrand.R

PlotPSI.A5SS.PosR Documentation

Plot percent spliced-in (PSI) values for alternative 5' splice site (A5SS) located on positive strand

Description

PlotPSI.A5SS.Pos computes percent spliced-in (PSI) at each genomic coordinate for alternative 5' splice site (A5SS) located on positive (forward) strand.

Usage

PlotPSI.A5SS.Pos(
  tran_id,
  Bam,
  BamPheno,
  cell.types,
  min.coverage,
  cons.exon.cutoff,
  method,
  method.adj,
  sig.pval = 0.1,
  cell.types.colors,
  plot.title,
  plot.width,
  plot.height,
  plot.out,
  track = TRUE,
  nboots = 2000,
  show.mean.ci = TRUE
)

Arguments

tran_id

Character string. Splicing event nomenclature.

Bam

Character string. Path to folder where the BAM files and their corresponding index files are located.

BamPheno

object of class data.frame. Mandatory columns are bam.file.name and cell.type. bam.file.name column indicates BAM file names as per that found in the Bam folder. cell.type column indicates the cell group names.

cell.types

Character string. Cell types to plot. Should be the same number of cell groups or less than the cell.type column of the BamPheno argument.

min.coverage

Numeric value. Coverage (Total reads) threshold below which the PSI value of the genomic coordinate is annotate as missing value, i.e. no coverage.

cons.exon.cutoff

Numeric value. Limit the number of bases to plot for the constitutive exons. This allow users to focus the plots on the alternative exon.

method

Character string. Statistical test to compare the PSI values across the different cell types. "wilcox", "t.test", "ks", "ad", and "dts" available for 2-group comparison. "ANOVA" and "kw" available for 3- or more group comparison. "ks", "ad", "dts", and "kw", represent Kolmogorov–Smirnov, Anderson-Darling, DTS, and Kruskal-Wallis test, respectively.

method.adj

Character string. Adjust p-values for multiple testing. Options available as per p.adjust function.

sig.pval

Numeric value. Adjust p-value, below which, the p-value is considered statistically significant.

cell.types.colors

Character string. Legend colors for each cell type. Should be of same length as cell.types argument. To use ggplot2 default color scheme, please specify "ggplot.default".

plot.title

Character string. Main title for plot. Examples are gene ID, gene names, splicing ID etc..

plot.width

Numeric value. Width of plot.

plot.height

Numeric value. Height of plot.

plot.out

Character string. Path to folder to output plot.

track

Logical. If set to TRUE (default), a process of reading in the BAM files, which is the rate-limiting step, will be tracked on the console.

nboots

Numeric value. When method set to "dts", the number of bootstrap iterations for computing the p-value.

show.mean.ci

Logical value. If set to TRUE, the 95percent confidence interval of the per-cell group mean PSI values will not be shown. Default is FALSE.

Details

This function computes percent spliced-in (PSI) at each genomic coordinate for alternative 5' splice site (A5SS) located on positive (forward) strand. Formula for computing PSI is number of reads with non-N CIGAR operation divided by the total number of reads. Total number of reads is the sum of reads with non-N CIGAR operation and reads with N-CIGAR operation

Value

A plot in PDF format located in the folder specified by plot.out argument.

Author(s)

Sean Wen <sean.wenwx@gmail.com>

Examples


# DO NOT RUN
PlotPSI.A5SS.Pos(
 tran_id="chr3:197950190:197950221|197950299
          :+@chr3:197950936:197950978",
 Bam="/Users/BAM/",
 BamPheno=BamPheno,
 cell.types=c("iPSC", "Endoderm"),
 min.coverage=10,
 cons.exon.cutoff=100,
 method="ks",
 method.adj="bonferroni",
 cell.types.colors="ggplot.default",
 plot.title="SNRPN",
 plot.width=5,
 plot.height=8,
 plot.out=paste(tempdir(), "Plot.pdf", sep="")
 )
 

wenweixiong/VALERIE documentation built on Dec. 7, 2022, 4:15 a.m.