randomNeedles {SITH} | R Documentation |
Simulate a sampling procedure which takes a fine needle through the simulated tumor and reports the mutation allele frequency of the sampled cells.
randomNeedles(tumor, nsamples, threshold = 0.05, coverage = 0)
tumor |
A list which is the output of |
nsamples |
The number of samples to take. |
threshold |
Only mutations with an allele frequency greater than the threshold will be included in the sample. |
coverage |
If nonzero then deep sequencing with specified coverage is performed. |
This sampling procedure is inspired by Chkhaidze et. al. (2019) and simulates fine needle aspiration. A random one-dimensional cross-section of the tumor is chosen, and the cells within this cross section are sampled, reporting mutation allele frequency.
Phillip B. Nicol
K. Chkhaidze, T. Heide, B. Werner, M. Williams, W. Huang, G. Caravagna, T. Graham, and A. Sottoriva. Spatially con- strained tumour growth affects the patterns of clonal selection and neutral drift in cancer genomic data. PLOS Computational Biology, 2019. https://doi.org/10.1371/journal.pcbi.1007243.
out <- simulateTumor(max_pop = 1000)
df <- randomNeedles(tumor = out, nsamples = 5)