setwd()
is not working in rmarkdown but
rmarkdown set as default the folder in which it is, so, if you need to
take data from other folders put the entire pathSpatial_expression_data.rds
file in
Datasets
: it contains normalized gene expression values for
genes annotated in kegg pathways. (load in in the expr
object)Spatial_expression_annotation_genes.csv
: it contains
information about marker genes for clusters of spots. (load in in the
mark
object)Spatial_expression_annotation_pathways.rds
: it contains
gene annotations (pathway they belong to). (load in in the
path
object)Spatial_expression_annotation_clusters.rds
: it contains
information about spot division in clusters. (load in in the
clus
object)Remember: you have to take every information and manipulate data only using r functions. Make your code reproducible
expr
by keeping:mark
(you can explore functionalities of
rowSums()
function)clus
belonging to annotated clusters (the ones
for with markers are available in mark
).Then:
Add annotations on both rows (pathway annotation) and columns (spot clusters).
Split columns according to clusters.
Add a barplot annotation on rows showing for each gene the total number of genes that belong to the pathway it belongs to (according to the entire kegg annotation).
Spatial_expression_annotation_genes.csv
in Datasets
(you already read it).