Skip to contents

GSEA (Gene Set Enrichment Analysis) Plot for seed, partner and combined Seed-partner regulons.

Usage

draw.GSEA_SINBA(
  rank_profile = NULL,
  use_genes_SINBA = NULL,
  use_genes_seed = NULL,
  use_genes_partner = NULL,
  use_direction = TRUE,
  use_direction_SINBA = NULL,
  use_direction_seed = NULL,
  use_direction_partner = NULL,
  main = "",
  pdf_file = NULL,
  annotation = NULL,
  annotation_cex = 1.2,
  left_annotation = NULL,
  right_annotation = NULL
)

Arguments

rank_profile

a named vector of numerics, the differential values (DE or DA) calculated from a sample comparison. Names of the vector must be gene names.The differential values can be "logFC", "t-statistics" or "Z-statistics".

use_genes_SINBA

a vector of characters, a vector of genes to display. The genes the targe genes from seed-partner pair. Seed-partner regulon can be generated by combineNet2target_list with (return_type="SINBA_target_list")

use_genes_seed

a vector of characters, a vector of genes to display. The genes the targe genes from the seed driver.

use_genes_partner

a vector of characters, a vector of genes to display. The genes the targe genes from the partner driver.

use_direction

a logical value, if TRUE, The target direction values need provided by user. The default value is TRUE.

use_direction_SINBA

a vector of numeric 1s and -1s, 1 is positive regulation from the seed-partner pair, -1 is negative regulation from seed-partner pair. Users can get this vector by converting the signs of "spearman". If NULL, no regulation direction will be displayed. Default is NULL.

use_direction_seed

a vector of numeric 1s and -1s, 1 is positive regulation from the seed, -1 is negative regulation from seed. Users can get this vector by converting the signs of "spearman". If NULL, no regulation direction will be displayed. Default is NULL.

use_direction_partner

a vector of numeric 1s and -1s, 1 is positive regulation from the partner, -1 is negative regulation from partner. Users can get this vector by converting the signs of "spearman". If NULL, no regulation direction will be displayed. Default is NULL.

main

character, an overall title for the plot. Default is "".

pdf_file

character, the file path to save as PDF file. If NULL, no PDF file will be saved. Default is NULL.

annotation

character, the annotation set by users for easier reference. Normally the annotation is the P-value or other statistics to show the significance of the interested seed-partner driver pairs.If NULL, will perform a Kolmogorov-Smirnov test to get the significance value. Default is NULL.

annotation_cex

numeric, giving the amount by which the text of annotation should be magnified relative to the default. Default is 1.2.

left_annotation

character, annotation displayed on the left of the figure, representing left condition of the rank_profile. Default is "".

right_annotation

character, annotation displayed on the right of the figure, representing right condition of the rank_profile. Default is "".

Value

Return a logical value. If TRUE, the plot has been created successfully.

Examples

lck_fyn<-combineNet2target_list(target_list=SINBA.par$sinba.network$target_list,seed_name="LCK",partner_name="FYN",return_type="SINBA_target_list")
#> Error in combineNet2target_list(target_list = SINBA.par$sinba.network$target_list,     seed_name = "LCK", partner_name = "FYN", return_type = "SINBA_target_list"): could not find function "combineNet2target_list"
genes_SINBA<-lck_fyn[[1]]$target
#> Error: object 'lck_fyn' not found
genes_seed<-SINBA.par$sinba.network$target_list$LCK$target
#> Error: object 'SINBA.par' not found
genes_partner<-SINBA.par$sinba.network$target_list$FYN$target
#> Error: object 'SINBA.par' not found
dir_SINBA<-sign(lck_fyn[[1]]$spearman)
#> Error: object 'lck_fyn' not found
dir_seed<-sign(SINBA.par$sinba.network$target_list$LCK$spearman)
#> Error: object 'SINBA.par' not found
dir_partner<-sign(SINBA.par$sinba.network$target_list$FYN$spearman)
#> Error: object 'SINBA.par' not found
rank_profile <- SINBA.par$DE[[comp_name]]$`Z-statistics`
#> Error: object 'SINBA.par' not found
names(rank_profile)<-SINBA.par$DE[[comp_name]]$ID
#> Error: object 'SINBA.par' not found
rank_profile<-rank_profile[order(-rank_profile)]
#> Error: object 'rank_profile' not found
draw.GSEA_SINBA(rank_profile=rank_profile,use_genes_SINBA=genes_SINBA,use_genes_seed=genes_seed,use_genes_partner=genes_partner,use_direction=TRUE, use_direction_SINBA=dir_SINBA,use_direction_seed=dir_seed,use_direction_partner=dir_partner,main="LCK_FYN",pdf_file=sprintf("%s/GSEA_LCK_FYN.pdf",plot.dir),annotation=NULL,annotation_cex=1.2,left_annotation="Sensitive",right_annotation="Resistant")
#> Error in draw.GSEA_SINBA(rank_profile = rank_profile, use_genes_SINBA = genes_SINBA,     use_genes_seed = genes_seed, use_genes_partner = genes_partner,     use_direction = TRUE, use_direction_SINBA = dir_SINBA, use_direction_seed = dir_seed,     use_direction_partner = dir_partner, main = "LCK_FYN", pdf_file = sprintf("%s/GSEA_LCK_FYN.pdf",         plot.dir), annotation = NULL, annotation_cex = 1.2, left_annotation = "Sensitive",     right_annotation = "Resistant"): could not find function "draw.GSEA_SINBA"

if (FALSE) { # \dontrun{
} # }