processDriverProfile: Clean Activity-based profile

View source: R/pipeline_functions.R

processDriverProfileR Documentation

Clean Activity-based profile

Description

processDriverProfile is a helper function to pre-process Activity-based profile.

Usage

processDriverProfile(
  Driver_profile,
  Driver_name,
  choose_strategy = "min",
  return_type = "driver_name"
)

Arguments

Driver_profile

a numeric vector, contain statistics for drivers (e.g driver's target size, driver's Z-statistics)

Driver_name

a character vector, contain name for drivers. The length of 'Driver_profile' and 'Driver_name' must be equal and the order of item must match.

choose_strategy

character, strategy of selection if duplicate driver name (e.g TP53_TF, TP53_SIG). Choose from "min","max","absmin","absmax". Default is "min".

return_type

character, strategy of return type. Choose from "driver_name","gene_name", "driver_statistics", "gene_statistics". If choose "*_name", only the name vector is returned. If choose "*_statistics", the statistics vector is returned with character name. Default is "driver_name".

Examples

analysis.par <- list()
analysis.par$out.dir.DATA <- system.file('demo1','driver/DATA/',package = "NetBID2")
NetBID.loadRData(analysis.par=analysis.par,step='ms-tab')
ms_tab <- analysis.par$final_ms_tab
Driver_profile <- ms_tab$P.Value.G4.Vs.WNT_DA
Driver_name <- ms_tab$gene_label
res1 <- processDriverProfile(Driver_profile=Driver_profile,
                              Driver_name=Driver_name,
                              choose_strategy='min')
res2 <- processDriverProfile(Driver_profile=Driver_profile,
                              Driver_name=Driver_name,
                              return_type = 'gene_name',
                              choose_strategy='min')
Driver_profile <- ms_tab$Z.G4.Vs.WNT_DA
res3 <- processDriverProfile(Driver_profile=Driver_profile,
                              Driver_name=Driver_name,
                              choose_strategy='absmax',
                              return_type = 'driver_statistics')
res4 <- processDriverProfile(Driver_profile=Driver_profile,
                              Driver_name=Driver_name,
                              choose_strategy='absmax',
                              return_type = 'gene_statistics')
driver_size <- ms_tab$Size
res5 <- processDriverProfile(Driver_profile=driver_size,
                              Driver_name=Driver_name,
                              choose_strategy='max')

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.