plot_ASE_diff: Boxplot of the estimated SNP-level ASE difference between two...

Description Usage Arguments Value

View source: R/ASEP functions.R

Description

This function is used to showed the estimated SNP-level ASE difference, i.e. major allele proportion difference, between two condition samples across all individuals and SNPs after haplotype phasing. The individuals are aligned based on an increasing trend of their median ASE differences across all snps for a given gene.

Usage

1
plot_ASE_diff(dat, phased = FALSE, minu_ref = TRUE)

Arguments

dat:

bulk RNA-seq data of a given gene. 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

minu_ref:

a logical value indicates when calculating the difference, whether the "ref_condition" should be treated as the minuend, i.e. the difference is calculated as estimated ASE for minuend_condition minus that for the other condition. Default is TRUE

Value

The boxplot (ggplot2::geom_boxplot) of the estimated SNP-level ASE difference between two conditions across individuals


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