runCombinedFisherTest: Do fisher test for only one pathway from search result...

View source: R/ReturnPathwaysEnrich_InputAnalytes.R

runCombinedFisherTestR Documentation

Do fisher test for only one pathway from search result clicked on highchart

Description

Do fisher test for only one pathway from search result clicked on highchart

Usage

runCombinedFisherTest(
  analytes,
  NameOrIds = "ids",
  total_genes = 20000,
  min_analyte = 2,
  MCall = F,
  alternative = "less",
  min_path_size = 5,
  max_path_size = 150,
  includeRaMPids = FALSE,
  background_type = "database",
  background = "database"
)

Arguments

analytes

a vector of analytes (genes or metabolites) that need to be searched

NameOrIds

whether input is "names" or "ids" (default is "ids", must be the same for analytes and background)

total_genes

number of genes analyzed in the experiment (e.g. background) (default is 20000, with assumption that analyte_type is "genes")

min_analyte

if the number of analytes (gene or metabolite) in a pathway is < min_analyte, do not report

MCall

T/F if true, all pathways are used for multiple comparison corrections; if false, only pathways covering user analytes will be used (default is "F")

alternative

alternative hypothesis test passed on to fisher.test(). Options are two.sided, greater, or less (default is "less")

min_path_size

the minimum number of pathway members (genes and metabolites) to include the pathway in the output (default = 5)

max_path_size

the maximum number of pathway memnbers (genes and metaboltes) to include the pathway in the output (default = 150)

includeRaMPids

include internal RaMP identifiers (default is "FALSE")

background_type

type of background that is input by the user. Opions are "database" if user wants all analytes from the RaMP database to be used as background; "file", if user wnats to input a file path with a list of background analytes; "list", if user wants to input a vector of analyte IDs; "biospecimen", if user wants to specify a biospecimen type (e.g. blood, adipose tissue, etc.) and have those biospecimen-specific analytes used. For genes, only the "database" option is used.

background

background to be used for Fisher's tests. If parameter 'background_type="database"', this parameter is ignored (default="database"); if parameter 'background_type= "file"', then 'background' should be a file name (with directory); if 'background_type="list"', then 'background' should be a vector of RaMP IDs; if 'backgroud_type="biospecimen"' then users should specify one of the following: "Blood", "Adipose tissue", "Heart", "Urine", "Brain", "Liver", "Kidney", "Saliva", and "Feces"

Value

a list containing two entries: [[1]] fishresults, a dataframe containing pathways with Fisher's p values (raw and with FDR and Holm adjustment), number of user analytes in pathway, total number of analytes in pathway, and pathway source ID/database. [[2]] analyte_type, a string specifying the type of analyte input into the function ("genes", "metabolites", or "both")

Examples

## Not run: 
pkg.globals <- setConnectionToRaMP(
  dbname = "ramp2", username = "root",
  conpass = "", host = "localhost"
)
analyte.list <- c('chebi:15344', 'chebi:10983', 'chebi:15351',
                  'uniprot:Q86V21', 'uniprot:Q02338', 'uniprot:Q9BUT1')

fisher.results <- runCombinedFisherTest(analytes = analyte.list, NameOrIds = 'ids')

## End(Not run)

ncats/RaMP-DB documentation built on May 6, 2022, 1:35 a.m.