This function is used to perform ASE detection for one condition analysis of a given gene.

one_condition_analysis_Gene(
  dat,
  phased = FALSE,
  varList = NULL,
  n_resample = 10^6,
  adaptive = TRUE,
  parallel = FALSE,
  n_core = 1
)

Arguments

dat:

bulk RNA-seq data of a given gene. Must contain variables:

  • `id`: character, individual identifier;

  • `ref`: numeric, the snp-level read counts for the reference allele if the haplotype phase of the data is unknown, and the snp-level read counts for allele aligned on paternal/maternal haplotype if haplotype phase is known;

  • `total`: numeric, snp-level total read counts for both alleles;

phased:

a logical value indicates whether the haplotype phase of the data is known or not. Default is FALSE

varList:

a character string specifies formula of covariates that users want to adjusted in the model. An example could be "`var1`+`var2`". Default is NULL

n_resample:

a numeric value indicates the maximum number of resamplings performed to obtain estimated p-value. Default is 10^6

adaptive:

a logical value indicates whether the resampling is done through an adaptive procedure or not. Only applies when n_resample >= 10^3. Default is TRUE
By adaptive, it means first do 1000 resamplings, if the estimated p-value < 0.1, increase the number of resampling, by a factor of 10, to 10^4. if then the estimated p-value < 0.01, increase the number of resampling again, by a factor of 10, to 10^5. The procedure continuous until reaches the maximum number of resampling.

parallel:

a logical value indicates whether do parallel computing for the resampling precedure or not. Default is FALSE

n_core:

a numeric value indicates number of clusters used for parallel computing when parameter "parallel" is set to TRUE. Default is 1

Value

A vector with two elements:

  • `LRT statistic`: numeric, the likelihood ratio test (LRT) statistics of ASE effect;

  • `p-value`: the estimated p-value of the LRT statistic;