View source: R/do_CopyNumberVariantPlot.R
do_CopyNumberVariantPlot | R Documentation |
Display CNV scores from inferCNV as Feature Plots.
do_CopyNumberVariantPlot(
sample,
infercnv_object,
chromosome_locations,
group.by = NULL,
using_metacells = FALSE,
metacell_mapping = NULL,
include_chr_arms = FALSE,
legend.type = "colorbar",
legend.position = "bottom",
legend.length = 20,
legend.width = 1,
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
legend.framecolor = "grey50",
legend.tickcolor = "white",
font.size = 14,
pt.size = 1,
font.type = "sans",
axis.text.x.angle = 45,
enforce_symmetry = TRUE,
legend.title = NULL,
na.value = "grey75",
viridis.palette = "G",
viridis.direction = 1,
verbose = FALSE,
min.cutoff = NA,
max.cutoff = NA,
number.breaks = 5,
diverging.palette = "RdBu",
diverging.direction = -1,
sequential.palette = "YlGnBu",
sequential.direction = -1,
use_viridis = TRUE,
return_object = FALSE,
grid.color = "white",
border.color = "black",
flip = FALSE,
plot.title.face = "bold",
plot.subtitle.face = "plain",
plot.caption.face = "italic",
axis.title.face = "bold",
axis.text.face = "plain",
legend.title.face = "bold",
legend.text.face = "plain"
)
sample |
|
infercnv_object |
|
chromosome_locations |
|
group.by |
|
using_metacells |
|
metacell_mapping |
|
include_chr_arms |
|
legend.type |
|
legend.position |
|
legend.length , legend.width |
|
legend.framewidth , legend.tickwidth |
|
legend.framecolor |
|
legend.tickcolor |
|
font.size |
|
pt.size |
|
font.type |
|
axis.text.x.angle |
|
enforce_symmetry |
|
legend.title |
|
na.value |
|
viridis.palette |
|
viridis.direction |
|
verbose |
|
min.cutoff , max.cutoff |
|
number.breaks |
|
diverging.palette |
|
diverging.direction |
|
sequential.palette |
|
sequential.direction |
|
use_viridis |
|
return_object |
|
grid.color |
|
border.color |
|
flip |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
A list containing Feature Plots for different chromosome regions and corresponding dot plots by groups..
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_CopyNumberVariantPlot", passive = TRUE)
if (isTRUE(value)){
# Consult the full documentation in https://enblacar.github.io/SCpubr-book/
# This function expects that you have run inferCNV on your
# own and you have access to the output object.
# Define your Seurat object.
sample <- readRDS(system.file("extdata/seurat_dataset_example.rds",
package = "SCpubr"))
# Define your inferCNV object.
infercnv_object <- readRDS(system.file("extdata/infercnv_object_example.rds",
package = "SCpubr"))
# Get human chromosome locations.
chromosome_locations = SCpubr::human_chr_locations
# Compute for a all chromosomes.
p <- SCpubr::do_CopyNumberVariantPlot(sample = sample,
infercnv_object = infercnv_object,
using_metacells = FALSE,
chromosome_locations = chromosome_locations)
} else if (base::isFALSE(value)){
message("This function can not be used without its suggested packages.")
message("Check out which ones are needed using `SCpubr::state_dependencies()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.