Description Usage Arguments Value Author(s) Examples
View source: R/Transform_gene_ararray.R
Test
1 | Transform_gene_array(object, of_sample, tissue_pos)
|
object |
SPATA object |
of_sample |
Name of the sample of the Spata Object |
tissue_pos |
File of the possition in the tissue |
No return but saves a json file to workdir
Dieter Henrik Heiland
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #Get Spata Object
library(SPATA)
input_paths = c("~/Desktop/SpatialTranscriptomics/Visium/Visium/275_T")
sample_names = c("275_T")
spata_obj <- initiateSpataObject_10X(input_paths=input_paths,
sample_names=sample_names,
object_name="Obj_275_T",
output_path = getwd())
tissue_pos=read.csv(paste0(input_paths,"/outs/spatial/tissue_positions_list.csv"), header=F)
names(tissue_pos)=c("barcodes", "tissue", "x_rank", "y_rank", "x", "y")
tissue_pos$barcodes=paste0(tissue_pos$barcodes, "_", sample_names)
#Tranform data to list
Transform_gene_array(object=spata_obj, of_sample=sample_names, tissue_pos)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.