NetBID.lazyMode.DriverEstimation: Lazy mode for NetBID2 driver estimation

View source: R/pipeline_functions.R

NetBID.lazyMode.DriverEstimationR Documentation

Lazy mode for NetBID2 driver estimation

Description

NetBID.lazyMode.DriverEstimation is an integrated function for NetBID2 driver estimation.

Usage

NetBID.lazyMode.DriverEstimation(
  project_main_dir = NULL,
  project_name = NULL,
  tf.network.file = NULL,
  sig.network.file = NULL,
  cal.eset = NULL,
  main_id_type = NULL,
  cal.eset_main_id_type = NULL,
  use_level = "gene",
  transfer_tab = NULL,
  intgroup = NULL,
  G1_name = NULL,
  G0_name = NULL,
  comp_name = NULL,
  do.QC = TRUE,
  DE_strategy = "bid",
  return_analysis.par = TRUE
)

Arguments

project_main_dir

character, name or absolute path of the main working directory for driver analysis.

project_name

character, name of the project folder.

tf.network.file

character, the path of the TF network file (e.g. "XXX/consensus_network_ncol_.txt").

sig.network.file

character, the path of the SIG network file (e.g. "XXX/consensus_network_ncol_.txt").

cal.eset

ExpressionSet class, the ExpressionSet for analysis.

main_id_type

character, the type of driver's ID. It comes from the attribute name in biomaRt package. Such as "ensembl_gene_id", "ensembl_gene_id_version", "ensembl_transcript_id", "ensembl_transcript_id_version" or "refseq_mrna". For details, user can call biomaRt::listAttributes() to display all available attributes in the selected dataset.

cal.eset_main_id_type

character, the type of cal.eset's ID. It comes from the attribute name in biomaRt package. Such as "ensembl_gene_id", "ensembl_gene_id_version", "ensembl_transcript_id", "ensembl_transcript_id_version" or "refseq_mrna". For details, user can call biomaRt::listAttributes() to display all available attributes in the selected dataset.

use_level

character, users can choose "transcript" or "gene". Default is "gene".

transfer_tab

data.frame, the ID conversion table. Users can call get_IDtransfer to get this table. Only useful when "cal.eset_main_id_type" does not equal to "main_id_type". This is mainly for converting ID for cal.eset, must include "cal.eset_main_id_type" and "main_id_type". If NULL, will automatically generate it.

intgroup

character, one interested phenotype group from the cal.eset.

G1_name

character, the name of experimental group (e.g. "Male"), must be the character in intgroup.

G0_name

character, the name of control group (e.g. "Female"), must be the character in intgroup.

comp_name

character, the name of the comparison of interest.

do.QC

logical, if TRUE, will perform network QC and activity eSet QC plots. Default is TRUE.

DE_strategy

character, use limma or bid to calculate differentiated expression/activity. Default is 'bid'.

return_analysis.par

logical, if TRUE, will return the complicated list object analysis.par.

Details

The function will return the complicated list object analysis.par if set return_analysis.par=TRUE. Meanwhile, the master table and the RData containing analysis.par will be automatically saved.

Examples

## Not run: 
network.dir <- sprintf('%s/demo1/network/',system.file(package = "NetBID2")) # use demo
network.project.name <- 'project_2019-02-14' # demo project name
project_main_dir <- 'test/'
project_name <- 'test_driver'
tf.network.file <- sprintf('%s/SJAR/%s/output_tf_sjaracne_%s_out_.final/%s',
                network.dir,network.project.name,network.project.name,
                'consensus_network_ncol_.txt')
sig.network.file <- sprintf('%s/SJAR/%s/output_sig_sjaracne_%s_out_.final/%s',
                network.dir,network.project.name,network.project.name,
                'consensus_network_ncol_.txt')
load(sprintf('%s/DATA/network.par.Step.exp-QC.RData',network.dir))
cal.eset <- network.par$net.eset
db.preload(use_level='gene')
analysis.par <- NetBID.lazyMode.DriverEstimation(project_main_dir=project_main_dir,
                project_name=project_name,
                tf.network.file=tf.network.file,
                sig.network.file=sig.network.file,
                cal.eset=cal.eset,
                main_id_type='external_gene_name',
                cal.eset_main_id_type='external_gene_name',
                intgroup='subgroup',
                G1_name='G4',G0_name='SHH',
                comp_name='G4.Vs.SHH',
                do.QC=FALSE,return_analysis.par=TRUE)

## End(Not run)

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