differential_ASE_detection: Perform gene-level differential ASE analysis in the...

Description Usage Arguments Value

View source: R/ASEP functions.R

Description

This function is used to detect differential ASE genes between two conditions given bulk RNA-seq data that may contain multiple genes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
differential_ASE_detection(
  dat_all,
  phased = FALSE,
  varList = NULL,
  adaptive = TRUE,
  n_resample = 10^6,
  parallel = FALSE,
  n_core = 1,
  save_out = FALSE,
  name_out = NULL
)

Arguments

dat_all:

bulk RNA-seq data. Must contain variables:

  • 'gene': character, gene name;

  • '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. 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

save_out:

a logical value indicates whether to write out the result for each gene stepwisely to a txt file. Default is FALSE

name_out:

a character string indicates the output file name when save_out is set to TRUE, with the format of "XXX.txt"

Value

A matrix with three columns:


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