two_conditions_analysis_Gene: Perform differential ASE analysis in the population for a...

Description Usage Arguments Value

View source: R/ASEP functions.R

Description

This function is used to perform differential ASE detection for two conditions analysis of a given gene.

Usage

1
2
3
4
5
6
7
8
9
two_conditions_analysis_Gene(
  dat,
  phased = FALSE,
  varList = NULL,
  adaptive = TRUE,
  n_resample = 10^6,
  parallel = FALSE,
  n_core = 1
)

Arguments

dat:

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

  • 'id': character, individual identifier;

  • 'snp': character, the name/chromosome location of the heterzygous genetic variants;

  • '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 the same paternal/maternal haplotype for both conditions if haplotype phase is known;

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

  • 'group': character, the condition each RNA-seq sample is obtained from (i.e., pre- vs post-treatment);

  • 'ref_condition': character, the condition used as the reference for pseudo haplotype phasing;

phased:

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

varList:

a character string specifies fomula 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:


Jiaxin-Fan/ASEP documentation built on Aug. 9, 2021, 6:39 a.m.