R/Spatial_marker_expression.R
Spatial_marker_expression.Rd
Plotting a gene of interest in selected cells on the spatial image.
Spatial_marker_expression(
sample_names,
bcs_merge,
images_tibble,
matrix,
marker,
GEX_barcode,
title,
threshold,
size
)
Character vector containing the name of the sample.
Data frame containing imagerow, imagecol and barcode of the cells belonging to the spatial image. It can also be created by the function scaling_spatial_image_parameter by selecting the output parameter 10.
Tbl-df containing the sample name, grob, height and width of the spatial image. It can also be created by the function scaling_spatial_image_parameter by selecting the output parameter 5.
Data frame containing all the genes detected per cells. This data frame can be obtained by the scaling_parameters functions.
Character vector containing the name of a gene of interest.
Character vector containing the GEX barcode of the cell of interest with the -1 at the end
Character vector to name the plot.
Number, to define the threshold. If threshold = No, plot of the module and if threshold is a number, plot show the cells above the threshold.
Number, to define the size of the text, default = 15.
Returns a plot of the level of expression of a gene in cells.
if (FALSE) {
GEX_BCR_barcode<-vgm_with_simulated_VDJ$VDJ$GEX_barcode
GEX_BCR_barcode<-paste0(GEX_BCR_barcode,"-1") #Add -1 at the end of each barcode
#Without expression threshold
Spatial_marker_expression(matrix=scaling_parameters[[9]],
marker="CD3E",bcs_merge=scaling_parameters[[10]],
images_tibble=scaling_parameters[[5]],
GEX_barcode=GEX_BCR_barcode,sample_names=sample_names, title = "B cells",
threshold = "No")
#With expression threshold
Spatial_marker_expression(matrix=scaling_parameters[[9]],
marker="CD3E",bcs_merge=scaling_parameters[[10]],
images_tibble=scaling_parameters[[5]],
GEX_barcode=GEX_BCR_barcode,sample_names=sample_names, title = "B cells",
threshold = 5)
}