Skip to contents

Simulate some cytometry data for use in testing or documenting functions which require some cytometry data. Please run set.seed before running the function if you want to ensure reproducibility.

Usage

simCytoData(nmarkers = 10, ncells = rep(10000, 2))

Arguments

nmarkers

A numeric value specifying number of markers to simulate.

ncells

A numeric vector specifying the number of cells to simulate per sample. 1 vector element per sample.

Value

A data.table object containing the simulated cytometry data where rows represent cells and columns represent markers.

Author

Givanna Putri

Examples

set.seed(42)
cyto_dat <- simCytoData()
head(cyto_dat)
#>    Marker_1 Marker_2  Marker_3 Marker_4 Marker_5 Marker_6 Marker_7 Marker_8
#>       <num>    <num>     <num>    <num>    <num>    <num>    <num>    <num>
#> 1: 18.61597 17.43348  9.213419 18.40881 13.68860 12.77402 15.24751 7.140615
#> 2: 20.23361 19.82792  9.740510 18.16383 13.97108 14.25898 16.05032 5.863752
#> 3: 18.62743 17.76816 11.175358 18.59606 16.08534 13.69734 16.71550 4.750240
#> 4: 20.74051 19.94771  9.797939 18.43590 13.92092 12.64266 15.55953 8.173464
#> 5: 18.65938 18.87830  8.916928 17.83295 15.62066 11.37118 16.08417 6.664707
#> 6: 20.02696 20.76054  9.262685 16.89373 15.92339 13.40002 16.13880 6.862717
#>    Marker_9 Marker_10   Sample Cell_Id
#>       <num>     <num>   <char>  <char>
#> 1: 14.37555  14.18484 Sample_1  Cell_1
#> 2: 15.58007  15.56981 Sample_1  Cell_2
#> 3: 14.16156  14.92222 Sample_1  Cell_3
#> 4: 14.26637  15.10761 Sample_1  Cell_4
#> 5: 15.12219  15.64231 Sample_1  Cell_5
#> 6: 15.85313  15.52535 Sample_1  Cell_6
dim(cyto_dat)
#> [1] 20000    12