function to add HMRF Domain Type to cell meta data
addHMRF_V2(gobject, HMRFoutput, name = "hmrf")
giotto object
This function appends HMRF domain clusters to corresponding cell meta data for all the beta values, with the given HMRF model names. For example, if name = ‘hmrf1’ and name of result in HMRFoutput is ‘k=8 b=0.00’, the appended cell meta data column will be named with ‘hmrf1 k=8 b=0.00’
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
#>
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#> "/usr/bin/python3"
g <- binSpect(g, return_gobject = TRUE)
#>
#> This is the single parameter version of binSpect
#>
#> 1. matrix binarization complete
#>
#> 2. spatial enrichment test completed
#>
#> 3. (optional) average expression of high
#> expressing cells calculated
#>
#> 4. (optional) number of high expressing cells
#> calculated
HMRF_init_obj <- initHMRF_V2(gobject = g, cl.method = "km")
#>
#> If used in published research, please cite:
#> Q Zhu, S Shah, R Dries, L Cai, GC Yuan.
#> 'Identification of spatially associated subpopulations by combining
#> scRNAseq and sequential fluorescence in situ hybridization data'
#> Nature biotechnology 36 (12), 1183-1190. 2018
#> Error: packages 'tidygraph', 'ggraph', 'smfishHmrf', 'graphcoloring' are not yet installed
#>
#> To install:
#> install.packages(c("tidygraph", "ggraph"))
#> devtools::install_bitbucket("qzhudfci/smfishHmrf-r")
#> devtools::install_bitbucket("qzhudfci/graphcoloring")
HMRFoutput <- doHMRF_V2(HMRF_init_obj = HMRF_init_obj, betas = c(0, 5, 2))
#>
#> If used in published research, please cite:
#> Q Zhu, S Shah, R Dries, L Cai, GC Yuan.
#> 'Identification of spatially associated subpopulations by combining
#> scRNAseq and sequential fluorescence in situ hybridization data'
#> Nature biotechnology 36 (12), 1183-1190. 2018
#>
#> Please find more explanation and instruction of the HMRF function
#> on
#> https://bitbucket.org/qzhudfci/smfishhmrf-r/src/master/TRANSITION.md
#> Error in eval(expr, envir, enclos): object 'HMRF_init_obj' not found
addHMRF_V2(gobject = g, HMRFoutput = HMRFoutput)
#> Error in eval(expr, envir, enclos): object 'HMRFoutput' not found