### Install scMultiSim from Bioconductor Source: https://zhanglabgt.github.io/scMultiSim/index.html Recommended installation method using BiocManager. ```R if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("scMultiSim") ``` -------------------------------- ### Install scMultiSim development version Source: https://zhanglabgt.github.io/scMultiSim/index.html Install the latest features directly from the GitHub repository. ```R devtools::install_github("ZhangLabGT/scMultiSim@main") ``` -------------------------------- ### Initialize Island Layout Source: https://zhanglabgt.github.io/scMultiSim/articles/spatialCCI.html Start a simulation using the islands layout configuration. ```R results <- sim_true_counts(spatial_options( ``` -------------------------------- ### Phyla1(len = 1) Source: https://zhanglabgt.github.io/scMultiSim/reference/Phyla1.html Creates a linear example tree of a specified length. ```APIDOC ## Phyla1 ### Description Creates a linear example tree for use in phylogenetic simulations. ### Usage Phyla1(len = 1) ### Arguments - **len** (numeric) - The length of the tree. ### Value Returns an R phylo object. ### Example ```r Phyla1(len = 1) ``` ``` -------------------------------- ### Implement a sequential grid layout Source: https://zhanglabgt.github.io/scMultiSim/articles/spatialCCI.html Example of a layout function that places cells sequentially in a grid starting from the bottom-left. ```R results <- sim_true_counts(spatial_options( layout = function (grid_size, cell_types) { ncells <- length(cell_types) new_locs <- matrix(nrow = ncells, ncol = 2) # for each cell... for (i in 1:ncells) { # ...place it in the grid new_locs[i,] <- c(i %% grid_size, i %/% grid_size) } return(new_locs) } )) ``` -------------------------------- ### Example execution of sim_example_200_cells Source: https://zhanglabgt.github.io/scMultiSim/reference/sim_example_200_cells.html Demonstrates the basic execution of the function and the resulting output structure. ```R sim_example_200_cells() #> Time spent: 0.01 mins #> #> attr(,"name") #> [1] "scMultiSim Result" ``` -------------------------------- ### Simulating Observed Counts Example Source: https://zhanglabgt.github.io/scMultiSim/reference/True2ObservedCounts.html An example demonstrating how to generate an observed count matrix using simulated cell data and gene length information. ```R results <- sim_example_200_cells() #> Time spent: 0.01 mins data(gene_len_pool) gene_len <- sample(gene_len_pool, results$num_genes, replace = FALSE) True2ObservedCounts( results$counts, results$cell_meta, protocol = "nonUMI", randseed = 1, alpha_mean = 0.1, alpha_sd = 0.05, gene_len = gene_len, depth_mean = 1e5, depth_sd = 3e3 ) #> 50..100..150..200.. #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] 2855 1252 2756 402 2156 2601 651 2771 1673 1189 36 1877 1650 #> [2,] 437 0 955 388 1007 822 377 699 528 281 2058 251 124 #> [3,] 0 535 0 533 324 105 0 0 111 0 0 0 0 #> [4,] 260 0 0 0 104 0 0 0 0 0 0 0 0 #> [5,] 46522 3111 6317 1042 1122 2140 8310 5735 7225 7794 1250 3003 6211 #> [6,] 0 0 0 0 0 0 0 0 0 0 600 0 0 #> [7,] 716 3291 4531 2578 1883 3640 4362 2240 5645 3432 2614 3870 6287 #> [8,] 3292 1907 1862 396 2443 1044 2211 1900 1594 2167 3758 2488 3306 #> [9,] 580 662 324 370 0 1020 1281 0 621 1179 820 835 0 #> [10,] 0 0 0 0 0 0 0 0 0 0 0 0 0 #> [11,] 197 0 168 0 0 0 0 0 435 0 0 0 0 #> [12,] 313 1351 0 0 389 0 0 0 0 1100 123 0 0 #> [13,] 0 189 595 0 0 0 97 74 608 282 0 0 0 #> [14,] 0 0 0 0 1066 0 55 0 0 167 0 398 0 #> [15,] 35 538 0 306 0 0 0 466 124 228 0 379 0 #> [16,] 0 0 0 110 222 0 0 0 0 0 0 0 0 #> [17,] 985 1870 1081 990 717 1236 3496 77 711 1339 0 1019 1007 #> [18,] 69 1004 630 620 143 744 1476 1271 361 1213 0 0 703 #> [19,] 0 658 0 0 0 759 0 0 0 0 0 0 0 #> [20,] 1567 1453 4420 1169 2743 2613 1589 3414 1173 1049 3481 2695 5893 #> [21,] 1063 3436 3535 587 1278 367 1103 262 879 1376 1276 2792 3820 #> [22,] 0 0 185 1074 84 132 0 202 132 598 0 0 0 #> [23,] 0 1596 362 0 216 0 0 590 31 0 0 0 307 #> [24,] 539 0 0 0 511 276 0 0 769 0 0 0 0 #> [25,] 0 0 223 437 0 0 28 0 182 0 0 0 0 #> [26,] 0 70 816 1717 1158 0 251 0 1062 336 759 680 3019 ``` -------------------------------- ### Example of plotting the CCI grid Source: https://zhanglabgt.github.io/scMultiSim/reference/plot_grid.html Demonstrates generating simulation results and plotting the grid. ```R results <- sim_example_200_cells_spatial() #> CCI simulation is enabled. #> Get CIF...100..200..Done #> Get params...Done #> Simulating...50..100..150..200.. #> Time spent: 2.13 mins plot_grid(results) ``` -------------------------------- ### Phyla3(plotting = FALSE) Source: https://zhanglabgt.github.io/scMultiSim/reference/Phyla3.html Creates an example phylogenetic tree with 3 tips and 2 internal nodes. ```APIDOC ## Phyla3(plotting = FALSE) ### Description Creates an example phylogenetic tree with 3 tips and 2 internal nodes. ### Usage Phyla3(plotting = FALSE) ### Arguments - **plotting** (boolean) - Optional - True for plotting the tree on console, False for no plot. ### Value Returns an R phylo object. ### Examples ```r Phyla3() ``` ``` -------------------------------- ### sim_example_200_cells(velocity = FALSE) Source: https://zhanglabgt.github.io/scMultiSim/reference/sim_example_200_cells.html Simulates a small example dataset with 200 cells and the 100-gene GRN. ```APIDOC ## sim_example_200_cells ### Description Simulate a small example dataset with 200 cells and the 100-gene GRN. ### Usage ```R sim_example_200_cells(velocity = FALSE) ``` ### Arguments - **velocity** (logical) - Optional - Whether to simulate RNA velocity. Defaults to FALSE. ### Value Returns the simulation result as an environment object. ### Examples ```R sim_example_200_cells() ``` ``` -------------------------------- ### Phyla5(plotting = FALSE) Source: https://zhanglabgt.github.io/scMultiSim/reference/Phyla5.html Generates an example phylogenetic tree with 5 tips. Returns an R phylo object. ```APIDOC ## Phyla5 ### Description Creates an example phylogenetic tree with 5 tips. ### Usage Phyla5(plotting = FALSE) ### Arguments - **plotting** (logical) - Optional - If TRUE, plots the tree on the console. ### Value Returns an R phylo object. ### Examples ```r Phyla5() ``` ``` -------------------------------- ### Example: Plotting cell locations Source: https://zhanglabgt.github.io/scMultiSim/reference/plot_cell_loc.html Demonstrates how to generate a plot using a simulation result object. ```R results <- sim_example_200_cells_spatial() #> CCI simulation is enabled. #> Get CIF...100..200..Done #> Get params...Done #> Simulating...50..100..150..200.. #> Time spent: 2.17 mins plot_cell_loc(results) ``` -------------------------------- ### Example Output of sim_example_200_cells_spatial Source: https://zhanglabgt.github.io/scMultiSim/reference/sim_example_200_cells_spatial.html Shows the console output and return value structure when running the simulation. ```R sim_example_200_cells_spatial() #> CCI simulation is enabled. #> Get CIF...100..200..Done #> Get params...Done #> Simulating...50..100..150..200.. #> Time spent: 2.17 mins #> #> attr(,"name") #> [1] "scMultiSim Result" ``` -------------------------------- ### Example usage of divide_batches Source: https://zhanglabgt.github.io/scMultiSim/reference/divide_batches.html Demonstrates the workflow of simulating cells, adding noise, and then applying batch effects. ```R results <- sim_example_200_cells() #> Time spent: 0.01 mins add_expr_noise(results) #> Adding experimental noise... #> 50..100..150..200..Using atac_counts #> Time spent: 0.02 mins divide_batches(results) #> Adding batch effects... ``` -------------------------------- ### Get_ATAC_correlation Example Source: https://zhanglabgt.github.io/scMultiSim/reference/Get_ATAC_correlation.html Example usage demonstrating the function with simulated data. ```R results <- sim_example_200_cells() #> Time spent: 0.02 mins Get_ATAC_correlation(results$counts, results$atacseq_data, results$num_genes) #> [1] 0.1455535 ``` -------------------------------- ### Example usage of gene_corr_cci Source: https://zhanglabgt.github.io/scMultiSim/reference/gene_corr_cci.html Demonstrates running the correlation analysis on a simulated dataset. ```R results <- sim_example_200_cells_spatial() #> CCI simulation is enabled. #> Get CIF...100..200..Done #> Get params...Done #> Simulating...50..100..150..200.. #> Time spent: 2.11 mins gene_corr_cci(results) #> [[1]] #> target regulator correlation corr.non.nbs corr.non.ct #> 1 101 103 0.13046674 -0.04319376 0.02076041 #> 2 102 104 0.05855992 0.02218742 0.01952666 #> #> [[2]] #> ``` -------------------------------- ### Example usage of plot_gene_module_cor_heatmap Source: https://zhanglabgt.github.io/scMultiSim/reference/plot_gene_module_cor_heatmap.html Demonstrates generating a heatmap from simulation results. ```R results <- sim_example_200_cells() #> Time spent: 0.01 mins plot_gene_module_cor_heatmap(results) #> NULL ``` -------------------------------- ### Get_1region_ATAC_correlation Example Source: https://zhanglabgt.github.io/scMultiSim/reference/Get_1region_ATAC_correlation.html Example usage demonstrating the function with simulated data. ```R results <- sim_example_200_cells() #> Time spent: 0.02 mins Get_1region_ATAC_correlation(results$counts, results$atacseq_data, results$region_to_gene) #> [1] 0.211397 ``` -------------------------------- ### sim_example_200_cells_spatial() Source: https://zhanglabgt.github.io/scMultiSim/reference/sim_example_200_cells_spatial.html Executes a simulation of a small example dataset with 200 cells and a 100-gene GRN, including spatial cell-cell interactions. ```APIDOC ## sim_example_200_cells_spatial() ### Description Simulates a small example dataset with 200 cells and the 100-gene GRN, with CCI enabled. ### Usage ```R sim_example_200_cells_spatial() ``` ### Value Returns the simulation result as an environment object. ``` -------------------------------- ### Configure CCI Parameters Source: https://zhanglabgt.github.io/scMultiSim/articles/options Example of defining the 'cci' list with a data frame of ligand-receptor interaction effects. ```R cci = list( params = data.frame( target = c(2, 6, 10, 8, 20, 30), regulator = c(101, 102, 103, 104, 105, 106), effect = 20 ) ) ``` -------------------------------- ### Example of gen_clutter execution Source: https://zhanglabgt.github.io/scMultiSim/reference/gen_clutter.html Demonstrates a basic call to generate 10 cells centered at coordinates (5, 5). ```R gen_clutter(10, 10, c(5, 5)) #> Error in gen_clutter(10, 10, c(5, 5)): could not find function "gen_clutter" ``` -------------------------------- ### Example of generating a t-SNE plot Source: https://zhanglabgt.github.io/scMultiSim/reference/plot_tsne.html Demonstrates how to generate a t-SNE plot using simulated cell data. ```R results <- sim_example_200_cells() #> Time spent: 0.01 mins plot_tsne(log2(results$counts + 1), results$cell_meta$pop) ``` -------------------------------- ### Display Observed Count Matrix Source: https://zhanglabgt.github.io/scMultiSim/reference/True2ObservedCounts.html Example output showing a subset of the observed count matrix generated by the simulation. ```text #> [58,] 1229 516 979 1119 1050 1130 659 3416 3065 1516 #> [59,] 0 4265 3529 1584 970 2525 94 586 3354 158 #> [60,] 0 3060 0 1803 686 881 3129 177 189 2626 #> [61,] 0 1011 0 1544 888 0 193 0 1541 138 #> [62,] 0 0 0 132 0 565 0 0 0 458 #> [63,] 4705 0 0 0 2374 451 371 845 872 1345 #> [64,] 660 0 509 604 0 0 0 0 0 0 #> [65,] 0 0 659 61 990 0 537 177 0 0 #> [66,] 0 2288 6486 803 752 856 1379 3675 1877 1862 #> [67,] 3534 1029 562 0 1405 153 2053 2546 151 0 #> [68,] 0 0 3452 0 0 3744 86 0 0 3468 #> [69,] 0 0 0 0 0 0 0 0 0 0 #> [70,] 0 2609 0 1411 257 0 292 0 99 0 #> [71,] 0 0 0 3146 261 0 0 0 154 0 #> [72,] 830 7625 0 0 2589 738 1018 410 423 361 #> [73,] 1168 2995 1083 314 2271 1106 2043 4303 1284 4774 #> [74,] 0 2856 0 0 0 0 0 801 688 0 #> [75,] 0 587 1494 384 928 0 1129 767 2111 546 #> [76,] 0 0 0 0 0 0 0 0 0 101 #> [77,] 0 0 0 721 0 0 1237 870 60 512 #> [78,] 1441 3174 3951 1223 403 1116 908 1606 1047 595 #> [79,] 0 0 0 1036 848 0 0 0 0 448 #> [80,] 0 0 2552 470 616 0 816 0 1183 2105 #> [81,] 0 1425 500 1514 1612 428 1593 620 1537 5118 #> [82,] 0 0 2537 0 0 0 0 318 0 151 #> [83,] 0 0 0 2246 0 320 0 1653 0 0 #> [84,] 1982 228 3664 402 0 0 168 2453 1997 1374 #> [85,] 0 0 5487 0 0 5316 2037 446 471 404 #> [86,] 0 801 3199 69 221 3114 0 0 1362 272 #> [87,] 2632 0 0 1468 0 2314 0 1038 476 0 #> [88,] 3045 400 0 738 11073 2065 0 1496 3013 3633 #> [89,] 0 0 0 0 0 0 0 0 559 180 #> [90,] 1212 1959 1176 0 1192 1893 553 0 0 0 #> [91,] 0 0 630 871 0 730 666 243 176 0 #> [92,] 496 0 2540 124 222 932 546 573 299 351 #> [93,] 0 1583 761 0 1545 1720 373 0 476 0 #> [94,] 4796 6173 4442 5172 8824 1289 5501 6922 6441 3143 #> [95,] 1289 488 0 846 0 1588 255 0 0 0 #> [96,] 212 2180 0 526 1399 2093 698 1502 965 229 #> [97,] 1976 5941 1521 4440 943 383 2650 2170 3271 561 #> [98,] 0 0 0 1517 2294 2754 1912 1623 0 0 #> [99,] 0 0 0 0 0 0 0 0 0 0 #> [100,] 412 0 0 276 0 0 252 569 0 0 #> [101,] 0 836 1260 0 1178 0 1464 580 1076 1661 #> [102,] 0 0 0 0 0 0 212 0 644 0 #> [103,] 0 0 1497 300 1053 0 553 98 0 0 #> [104,] 3077 0 0 0 0 2112 400 0 909 0 #> [105,] 0 0 0 0 0 378 0 0 0 0 #> [106,] 511 0 0 0 0 0 889 290 185 0 #> [107,] 2966 972 233 1007 670 4475 685 294 1414 1282 #> [108,] 723 0 0 1984 2819 356 1399 459 484 1121 #> [109,] 0 478 0 1330 0 0 749 821 0 0 #> [110,] 0 0 557 0 0 0 1094 403 0 0 #> [,168] [,169] [,170] [,171] [,172] [,173] [,174] [,175] [,176] [,177] #> [1,] 633 0 2161 1396 0 899 4540 0 1920 0 #> [2,] 214 731 1617 274 355 307 0 2856 586 613 #> [3,] 112 0 0 308 358 0 424 0 0 0 #> [4,] 0 0 0 0 0 0 0 0 0 0 #> [5,] 1522 6018 3115 335 2063 2254 2372 2933 3769 4315 #> [6,] 0 0 0 0 0 0 0 0 0 0 #> [7,] 7031 5548 2912 1550 3241 121 919 2219 1718 0 #> [8,] 487 3384 4977 3740 2973 2382 1311 5274 2529 1535 ``` -------------------------------- ### Initialize spatial domain layout Source: https://zhanglabgt.github.io/scMultiSim/articles/spatialCCI.html Start defining a layout function for creating spatial domains using circular clustering. ```R layout_fn <- function(grid_size, final_types) { ncells <- length(final_types) grid_center <- c(round(grid_size / 2), round(grid_size / 2)) all_locs <- gen_clutter(ncells, grid_size, grid_center) ``` -------------------------------- ### Example usage of gene_corr_regulator Source: https://zhanglabgt.github.io/scMultiSim/reference/gene_corr_regulator.html Demonstrates initializing simulation results and querying correlations for a specific regulator ID. ```R results <- sim_example_200_cells() #> Time spent: 0.01 mins gene_corr_regulator(results, 2) #> Gene correlations for 2: #> 78(0.80) 102 5(0.63) 37(0.62) 109 7(0.61) 73 54(0.59) 57 3(0.57) 36 1(0.55) 45 38 8(0.55) 20 30 108 88 33 72 101 29 21 75 42 25 66 56 58 27 44 61 13 17 47 51 84 69 50 97 79 59 46 9(0.39) 39 18 60 89(0.36) 48 95 83 80 93 92 67 65 31 32 77 28 96 104 10 99 64 107 15 62 43 41 68 90 103 40 26 35 98 71 81 24 85 52 74 6 87 14 19 11 53 49 70 76 16 63 4(0.10) 34 94 55 91 100 82 105 22 110 12 86(-0.08) 106 23 ``` -------------------------------- ### Example usage of plot_rna_velocity Source: https://zhanglabgt.github.io/scMultiSim/reference/plot_rna_velocity.html Demonstrates generating a simulation result object with velocity data and plotting it. ```R results <- sim_example_200_cells(velocity = TRUE) #> Time spent: 0.05 mins plot_rna_velocity(results) #> $raw #> #> $normalized #> #> $knn_normalized #> ``` -------------------------------- ### Access help for ext.cif.giv Source: https://zhanglabgt.github.io/scMultiSim/articles/spatialCCI.html Displays documentation for the ext.cif.giv parameter. ```R scmultisim_help("ext.cif.giv") ``` -------------------------------- ### Launch the Shiny App Source: https://zhanglabgt.github.io/scMultiSim/index.html Run the interactive visualization and parameter adjustment tool. ```R run_shiny() ``` -------------------------------- ### Access dynamic GRN help documentation Source: https://zhanglabgt.github.io/scMultiSim/articles/basics.html Displays usage information and configuration options for the dynamic GRN simulation module. ```R scmultisim_help("dynamic.GRN") ``` -------------------------------- ### Access scMultiSim help Source: https://zhanglabgt.github.io/scMultiSim/articles/basics.html Retrieve documentation for simulation options or specific parameters. ```R scmultisim_help("options") ``` -------------------------------- ### Configure simulation options Source: https://zhanglabgt.github.io/scMultiSim/articles/basics.html Sets up the simulation parameters including cell count, GRN, and trajectory settings. ```R options <- list( rand.seed = 0, GRN = GRN_params, num.cells = 1000, num.cifs = 50, cif.sigma = 0.5, tree = Phyla5(), diff.cif.fraction = 0.8, do.velocity = TRUE ) ``` -------------------------------- ### Observed Counts Matrix Output Source: https://zhanglabgt.github.io/scMultiSim/reference/True2ObservedCounts.html Example of the numerical matrix output generated by the True2ObservedCounts function. ```text #> [32,] 0 0 0 364 824 331 118 613 0 676 #> [33,] 925 1445 1616 259 3152 425 0 712 1151 1089 #> [34,] 0 0 0 0 0 0 0 0 0 0 #> [35,] 849 2017 541 2165 474 0 1728 352 1734 4446 #> [36,] 1890 2902 2729 2642 2432 3410 2397 3501 2880 6153 #> [37,] 967 1033 479 326 2177 1619 3053 4383 1550 4201 #> [38,] 0 0 320 0 0 816 0 0 104 0 #> [39,] 115 332 0 1660 0 0 0 445 1188 0 #> [40,] 0 0 774 237 0 0 0 658 0 0 #> [41,] 0 0 840 0 29 0 0 1461 0 0 #> [42,] 4167 940 3192 5142 3073 1320 1545 7201 901 6089 #> [43,] 249 1783 199 682 1959 0 260 0 601 1238 #> [44,] 4404 2510 3105 2221 1841 1536 478 2633 2392 2077 #> [45,] 1825 0 288 226 2330 295 668 0 3428 0 #> [46,] 650 1787 2641 998 1749 2678 2098 1721 455 1021 #> [47,] 0 778 392 726 1746 0 0 1131 273 616 #> [48,] 0 1152 743 2872 2186 0 1816 405 526 426 #> [49,] 326 322 0 0 0 273 0 0 0 0 #> [50,] 7058 0 7044 10253 956 5257 5534 9375 6983 7300 #> [51,] 0 0 126 0 0 0 0 0 108 219 #> [52,] 0 0 0 0 0 522 0 879 240 0 #> [53,] 0 0 0 680 0 0 352 0 471 0 #> [54,] 206 2702 935 62 415 2234 426 887 891 1471 #> [55,] 0 0 0 0 0 0 0 123 0 0 #> [56,] 2155 124 762 1359 2680 258 0 194 1629 3204 #> [57,] 179 254 1383 0 853 240 709 0 652 0 #> [58,] 4913 519 0 0 1141 0 193 1437 2507 0 #> [59,] 1859 2297 194 0 1042 923 30 1690 2536 0 #> [60,] 711 0 179 256 649 224 3270 260 774 1303 #> [61,] 0 0 716 1406 1910 1365 2543 0 146 0 #> [62,] 0 0 315 743 0 482 1609 96 1730 0 #> [63,] 1755 455 404 1222 348 1214 0 3482 0 836 #> [64,] 787 0 109 550 447 0 0 0 0 0 #> [65,] 741 0 0 0 475 0 0 354 0 0 #> [66,] 2181 3376 564 0 4140 1356 1080 2046 2201 888 #> [67,] 2402 1566 1918 1793 1990 2934 2252 226 2987 2870 #> [68,] 666 0 0 2578 1510 0 313 1019 782 2601 #> [69,] 0 0 762 0 0 0 0 0 654 0 #> [70,] 0 1643 1680 1467 868 0 1091 276 0 2303 #> [71,] 0 0 269 685 0 0 0 634 171 0 #> [72,] 1673 2420 2509 855 146 561 0 1509 931 164 #> [73,] 3027 1465 834 3856 3962 3073 1366 0 2236 2384 #> [74,] 0 0 0 1642 2450 2241 5031 7454 736 0 #> [75,] 2888 404 2192 1019 969 687 577 44 1290 547 #> [76,] 0 0 0 2407 0 0 0 0 0 0 #> [77,] 0 2066 903 0 1870 482 0 0 0 2596 #> [78,] 1123 2947 1248 2440 3158 6668 4982 1429 1099 1120 #> [79,] 0 0 0 0 0 0 0 0 0 0 #> [80,] 400 684 494 2829 1605 0 0 210 1562 1411 #> [81,] 1254 0 3695 0 1002 619 0 0 1187 0 #> [82,] 0 0 0 1310 0 0 0 403 51 0 #> [83,] 0 0 0 642 341 0 0 213 0 0 #> [84,] 664 1070 917 1667 499 1490 1256 100 2791 649 #> [85,] 2802 505 2756 0 818 846 1454 864 0 0 #> [86,] 0 0 0 0 0 3114 0 0 0 0 #> [87,] 0 1076 254 864 1562 340 1385 1030 324 0 #> [88,] 0 362 1307 2186 667 0 1562 3085 205 0 #> [89,] 0 0 342 0 0 625 0 0 0 0 #> [90,] 359 1411 5395 1544 1188 931 1722 0 1342 2031 #> [91,] 0 0 248 0 237 0 0 755 507 0 #> [92,] 0 322 918 0 1331 614 636 388 946 1264 #> [93,] 0 386 0 0 633 0 1723 0 275 0 ``` -------------------------------- ### Help output for ext.cif.giv Source: https://zhanglabgt.github.io/scMultiSim/articles/spatialCCI.html Documentation text for the ext.cif.giv function. ```text ## ext.cif.giv (default: NA) ## Add customized CIF and GIV. The function takes one argument, the kinetic ## parameter index (1=kon, 2=koff, 3=s). It should return a list of two el ## ements: the extra CIF matrix (n_extra_cif x n_cells) and the GIV matrix ## (n_genes x n_extra_cif). Return NULL for no extra CIF and GIV. ## should be a function ``` -------------------------------- ### run_shiny() Source: https://zhanglabgt.github.io/scMultiSim/reference/run_shiny.html Launches the interactive Shiny application for simulation configuration. ```APIDOC ## run_shiny() ### Description Launches the Shiny application to configure the simulation parameters through a graphical user interface. ### Usage ```r run_shiny() ``` ``` -------------------------------- ### scmultisim_help(topic = NULL) Source: https://zhanglabgt.github.io/scMultiSim/reference/scmultisim_help.html Displays detailed documentation for scMultiSim parameters. Users can specify a topic to filter the help information. ```APIDOC ## scmultisim_help(topic = NULL) ### Description Displays detailed documentation for scMultiSim parameters. Calling this function without arguments prints help for options by default. ### Parameters - **topic** (string) - Optional - The category of parameters to display. Supported values: "options", "dynamic.GRN", or "cci". ### Usage Example ```r # Display general options scmultisim_help() # Display dynamic GRN documentation scmultisim_help(topic = "dynamic.GRN") ``` ``` -------------------------------- ### Help Functions Source: https://zhanglabgt.github.io/scMultiSim/reference/index.html Functions to assist users in configuring simulations and accessing documentation. ```APIDOC ## run_shiny() ### Description Launch the Shiny App to configure the simulation. ## scmultisim_help() ### Description Show detailed documentations of scMultiSim's parameters. ``` -------------------------------- ### Load sample GRN parameters Source: https://zhanglabgt.github.io/scMultiSim/articles/basics.html Loads pre-defined GRN parameters and displays the first few rows. ```R data(GRN_params_100) GRN_params <- GRN_params_100 head(GRN_params) ``` -------------------------------- ### Configure simulation with diff.cif.fraction Source: https://zhanglabgt.github.io/scMultiSim/articles/basics.html Sets up simulation options and runs the simulation with specific differentiation fraction values. ```R options <- list( rand.seed = 0, GRN = GRN_params, num.cells = 1000, num.cifs = 50, tree = Phyla5(), diff.cif.fraction = 0.8 ) results <- sim_true_counts( options %>% list_modify(diff.cif.fraction = 0.2)) ``` ```R results <- sim_true_counts( options %>% list_modify(diff.cif.fraction = 0.8)) ``` -------------------------------- ### Simulate with discrete cell populations Source: https://zhanglabgt.github.io/scMultiSim/articles/basics.html Configure simulation options with discrete CIFs and execute the simulation. ```R options <- list( rand.seed = 0, GRN = GRN_params, num.cells = 1000, num.cifs = 50, tree = Phyla5(), diff.cif.fraction = 0.8, discrete.cif = TRUE ) results <- sim_true_counts(options) ``` -------------------------------- ### Accessing scMultiSim CCI Help Source: https://zhanglabgt.github.io/scMultiSim/articles/spatialCCI.html Displays instructions and configuration requirements for the cci option in scMultiSim. ```R library(scMultiSim) scmultisim_help("cci") ``` -------------------------------- ### Function usage syntax Source: https://zhanglabgt.github.io/scMultiSim/reference/sim_true_counts.html Basic syntax for calling the simulation function. ```R sim_true_counts(options) ```