inst/doc/spicy.R

params <-
list(test = FALSE)

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(BiocStyle)

## ----warning=FALSE, message=FALSE---------------------------------------------
# load required packages
library(spicyR)
library(ggplot2)

## ---- eval = FALSE------------------------------------------------------------
#  if (!require("BiocManager"))
#      install.packages("BiocManager")
#  BiocManager::install("spicyR")

## -----------------------------------------------------------------------------
data("diabetesData")
diabetesData
cellSummary(diabetesData)
imagePheno(diabetesData)

## ----message=FALSE------------------------------------------------------------
spicyTestPair <- spicy(diabetesData, 
                       condition = "stage", 
                       subject = "case", 
                       from = "beta", 
                       to = "delta")
spicyTestPair
topPairs(spicyTestPair)

## ----eval=FALSE---------------------------------------------------------------
#  spicyTest <- spicy(diabetesData,
#                     condition = "stage",
#                     subject = "case")

## -----------------------------------------------------------------------------
data("spicyTest")

## -----------------------------------------------------------------------------
spicyTest
topPairs(spicyTest)  

## -----------------------------------------------------------------------------
signifPlot(spicyTest, 
           breaks=c(-3, 3, 0.5),
           marksToPlot = c("alpha", "beta", "gamma", "delta", 
                           "B", "naiveTc", "Th", "Tc", "neutrophil", "macrophage"))

## -----------------------------------------------------------------------------
data("spicyTestBootstrap")

## ----eval=FALSE, warning=FALSE, message=FALSE---------------------------------
#  spicyTestBootstrap <- spicy(diabetesData,
#                              condition = "stage",
#                              subject = "case",
#                              from = "beta",
#                              to = "Tc",
#                              nsim = 1000)

## -----------------------------------------------------------------------------
spicyTestBootstrap

topPairs(spicyTestBootstrap)  

## -----------------------------------------------------------------------------
sessionInfo()

Try the spicyR package in your browser

Any scripts or data that you put into this service are public.

spicyR documentation built on March 17, 2021, 6:01 p.m.