visualize_gene: Visualize expression pattern for the gene of interest in...

View source: R/visualize_gene.R

visualize_geneR Documentation

Visualize expression pattern for the gene of interest in reference data and synthetic data

Description

Visualize expression pattern for the gene of interest in reference data and synthetic data

Usage

visualize_gene(
  simsrt,
  plotgn = NULL,
  ptsizeCount = 2,
  textsizeCount = 12,
  rev_y = FALSE,
  virOption = "D",
  virDirection = -1
)

Arguments

simsrt

A SRTsim object

plotgn

A gene name selected for visualization

ptsizeCount

Specification of point size. Default is 2.

textsizeCount

Specification of axis font size. Default is 12.

rev_y

Logical indicating whether to reverse the y axis. Default is FALSE. Useful for Visualize the LIBD data.

virOption

Specification of option in the scale_color_viridis. Default is "D". User can choose a letter from 'A' to 'H'.

virDirection

Specification of direction in the scale_color_viridis. Default is "-1". User can choose '1' or '-1'.

Value

Returns two expression plots for the gene of interest

Examples


## Create a simSRT object
toySRT  <- createSRT(count_in=toyData$toyCount,loc_in = toyData$toyInfo)
set.seed(1)
## Create New Locations within Profile
toySRT2 <- srtsim_newlocs(toySRT,new_loc_num=1000)

## Estimate model parameters for data generation
toySRT2 <- srtsim_fit(toySRT2,sim_schem="tissue")

## Generate synthetic data with estimated parameters
toySRT2     <- srtsim_count(toySRT2,rrr=1)

## compare the expression pattern of HLA-B in synthetic data and reference data
visualize_gene(simsrt=toySRT2,plotgn = "HLA-B")

SRTsim documentation built on Jan. 13, 2023, 5:12 p.m.