-
Notifications
You must be signed in to change notification settings - Fork 14
/
make_target_violin_plot.Rd
62 lines (54 loc) · 2.48 KB
/
make_target_violin_plot.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{make_target_violin_plot}
\alias{make_target_violin_plot}
\title{make_target_violin_plot}
\usage{
make_target_violin_plot(sce, target_oi, receiver_oi, group_oi, group_id, sample_id, celltype_id, batch_oi = NA, background_groups = NULL)
}
\arguments{
\item{sce}{SingleCellExperiment object}
\item{target_oi}{Name of the gene of interest}
\item{receiver_oi}{Character vector with the names of the receiver cell type of interest}
\item{group_oi}{Character vector of name of the group of interest}
\item{group_id}{Name of the meta data column that indicates from which group/condition a cell comes from}
\item{sample_id}{Name of the colData(sce) column in which the id of the sample is defined}
\item{celltype_id}{Name of the meta data column that indicates the cell type of a cell}
\item{batch_oi}{Name of a batch of interest based on which the visualization will be split. Default: NA: no batch.}
\item{background_groups}{Default NULL: all groups in the group_id metadata column will be chosen. But user can fill in a character vector with the names of all gruops of interest.}
}
\value{
ggplot object: Violin plot of a target gene of interest: per sample, and samples are grouped per group
}
\description{
\code{make_target_violin_plot} Violin plot of a target gene of interest: per sample, and samples are grouped per group
}
\examples{
\dontrun{
library(dplyr)
lr_network = readRDS(url("https://zenodo.org/record/3260758/files/lr_network.rds"))
lr_network = lr_network \%>\% dplyr::rename(ligand = from, receptor = to) \%>\% dplyr::distinct(ligand, receptor)
ligand_target_matrix = readRDS(url("https://zenodo.org/record/3260758/files/ligand_target_matrix.rds"))
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
batches = NA
contrasts_oi = c("'High-Low','Low-High'")
contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
output = multi_nichenet_analysis(
sce = sce,
celltype_id = celltype_id,
sample_id = sample_id,
group_id = group_id,
batches = batches,
lr_network = lr_network,
ligand_target_matrix = ligand_target_matrix,
contrasts_oi = contrasts_oi,
contrast_tbl = contrast_tbl
)
receiver_oi = "Malignant"
group_oi = "High"
target_oi = "RAB31"
p_violin_target = make_target_violin_plot(sce = sce, target_oi = target_oi, receiver_oi = receiver_oi, group_oi = group_oi, group_id = group_id, sample_id, celltype_id = celltype_id)
}
}