sample_reference_data {SeqNet} | R Documentation |
Sample genes from reference dataset
Description
Sample genes from reference dataset
Usage
sample_reference_data(reference_data, p, percent_ZI = NULL, threshold_ZI = 0.2)
Arguments
reference_data |
The reference data.frame to use. |
p |
The number of genes (columns) to sample. |
percent_ZI |
The desired percentage of zero-inflated genes. This percentage of zero-inflated genes will be sampled from the reference dataset, and the remaining will be non-zero-inflated. If NULL, then genes are sampled at random from the reference dataset. |
threshold_ZI |
The minimum proportion of zero counts for a gene to be considered as zero inflated. This is used to identify which genes in the reference dataset are zero-inflated. |
Value
The modified reference dataset.
Note
If p is greater than the number of columns in the reference dataset, then sampling with replacement will be used (with a warning message).
Examples
data(reference)
rnaseq <- reference$rnaseq
rnaseq_subset <- sample_reference_data(rnaseq, 10)
[Package SeqNet version 1.1.3 Index]