generate the input data for ONTraC v1

getONTraCv1Input(
  gobject,
  cell_type,
  output_path = getwd(),
  spat_unit = NULL,
  feat_type = NULL,
  verbose = TRUE
)

Arguments

gobject

giotto object

cell_type

the cell type column name in the metadata

output_path

the path to save the output file

spat_unit

spatial unit (e.g. "cell")

feat_type

feature type (e.g. "rna", "dna", "protein")

verbose

be verbose

Value

data.table with columns: Cell_ID, Sample, x, y, Cell_Type

Details

This function generate the input data for ONTraC v1

Examples

g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#>  "/usr/bin/python3"

getONTraCv1Input(
    gobject = g,
    cell_type = "custom_leiden"
)
#> ONTraC input file was saved as
#>  /home/runner/work/Giotto_website/Giotto_website/docs/reference/ONTraC_dataset_input.csv
#> Key: <Cell_ID>
#>                 Cell_ID Sample     x     y Cell_Type
#>                  <char> <char> <int> <int>     <num>
#>   1: AAAGGGATGTAGCAAG-1 ONTraC  5477 -4125         1
#>   2: AAATGGCATGTCTTGT-1 ONTraC  5959 -2808         3
#>   3: AAATGGTCAATGTGCC-1 ONTraC  4720 -5202         2
#>   4: AAATTAACGGGTAGCT-1 ONTraC  5202 -5322         2
#>   5: AACAACTGGTAGTTGC-1 ONTraC  4101 -4604         2
#>  ---                                                
#> 620: TTGTAATCCGTACTCG-1 ONTraC  4996 -5442         2
#> 621: TTGTATCACACAGAAT-1 ONTraC  6303 -2688         3
#> 622: TTGTCGTTCAGTTACC-1 ONTraC  5202 -3885         1
#> 623: TTGTGGCCCTGACAGT-1 ONTraC  5340 -3406         1
#> 624: TTGTTCAGTGTGCTAC-1 ONTraC  5615 -4125         1