Learn R Programming

SeqNet (version 1.1.3)

sample_reference_data: 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.

Examples

Run this code
# NOT RUN {
data(reference)
rnaseq <- reference$rnaseq
rnaseq_subset <- sample_reference_data(rnaseq, 10)
# }

Run the code above in your browser using DataLab