Transform_gene_array: Transform SPATA object into a python list (json-file)

Description Usage Arguments Value Author(s) Examples

View source: R/Transform_gene_ararray.R

Description

Test

Usage

1
Transform_gene_array(object, of_sample, tissue_pos)

Arguments

object

SPATA object

of_sample

Name of the sample of the Spata Object

tissue_pos

File of the possition in the tissue

Value

No return but saves a json file to workdir

Author(s)

Dieter Henrik Heiland

Examples

 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)

heilandd/heilandd documentation built on Jan. 1, 2021, 3:16 a.m.