The aim of this section is to compute the SVG of SRT which is use a R package of spark
This script was run on R,and following R package are required:
- spark(the latest)
This script can compute SVG of spatial transcriptome.If you want to generate the SVG of your own spatoal transcriptome data,you can use this script.
If you want tu use this script,you should provide two txt of your own spatial transcriptome data.
- The spatial transcriptome gene expression matrix. see expression-matrix
- The cell location and celltype matrix. see location-matrix
If you prepare the tow matrix,you can compute the SVG list by follow command
$ Rscript spark.r count.txt info.txt
The result of comand is SVG.txt.THis txt contain two colnume: "combined_pvalue" and "adjusted_pvalue" . The "adjusted_pvalue" is we need.
The aim of this section is to plot the cell
This script was run on the R,and following R package are required:
- spare
- ggplot2
- gridExtra
- reshape2
- grid
- RColorBrewer
This script can plot the cell by celltype and plot gene of SVG
If you want tu use this script,you should provide two txt of your own spatial transcriptome data.
- The spatial transcriptome gene expression matrix. see expression-matrix
- The cell location and celltype matrix. see location-matrix
- The SVG json file.see gene_config.json
If you prepare the three matrix,you can plot by follow command
$ Rscript cell_class_plot.r count.txt info.txt gene_config.json
The result of comand is cell_class.png ;single cell type.png ;gene.png