flowGraphSubset: flowGraph object constructor.

View source: R/00_flowGraphSubset_constructor.R

flowGraphSubsetR Documentation

flowGraph object constructor.

Description

Initializes a flowGraph object given the cell counts for one or more flow cytometry sample(s). The flowGraph object returned holds meta data for each sample, each cell population node, edges representing how each cell population node relate to one another, and features for these nodes and edges.

Usage

flowGraphSubset(
  input_,
  meta = NULL,
  class = "class",
  no_cores = 1,
  markers = NULL,
  layout_fun = "layout.reingold.tilford",
  max_layer = NULL,
  cumsumpos = FALSE,
  path = NULL,
  summary_pars = flowGraphSubset_summary_pars(),
  summary_adjust = flowGraphSubset_summary_adjust(),
  save_plots = TRUE
)

Arguments

input_

a numeric matrix of the cell counts; its column/names must be the phenotype names and its rownames must be sample ID's.

meta

A data frame with meta data for each Phenotypes or sample; One of its column names should be "id" whose values correspond to the name of each Phenotypes object. We also recommend for it to have a column named "class" where one of its unique values is "control".

class

A string corresponding to the column name or index of meta whose values represent the class label of each sample, Default: 'class'

no_cores

An integer indicating how many cores to parallelize on, Default: 1

markers

A string vector of marker names used in input_, Default: NULL

layout_fun

A string of a function from the igraph package that indicates what layout should be used if a cell hierarchy is to be ploted; all such functions have prefix layout_. This is defaulted to e.g. layout_fun="layout.reingold.tilford".

max_layer

And integer indicating the maximum layer in the cell hierarchy to analyze; set to 'NULL' to analyze all layers.

cumsumpos

A logical variable indicating whether or not to cumulate cell counts; this applies only when partitionsPerMarker > 3 and will convert e.g. the count of A+ or A++ into the sum of the counts of A+, A++, A+++, ..., or A++, A+++, ... , Default: FALSE

path

A string indicating the folder path to where the flowGraph object should save its elements, Default = NULL (don't save).

summary_pars

A list containing parameters for calculating the statistical significance summary significance that will determine whether to trim out phenotypes for this fast version of flowGraph. The lists' elements are:

  • node_feature: "SpecEnr"; this is the feature we will be testing, don't change this.

  • edge_feature: "NONE"; this unneeded for now.

  • test_name: "t_diminish"; this unneeded for now.

  • test_custom: "t"; a string or a function indicating the statistical test desires. These tests can be c("t", "wilcox","ks","var","chisq") corresponding to functions t.test,wilcox.test, ks.test,var.test, chisq.test

  • diminish: TRUE; whether or not to continue testing phenotypes whos parent phenotypes are all insignificant.

  • class: "class"; the column name in meta that contains class labels you want to test.

  • labels: c("aml", "control") for the flowcap data set; SET THIS!! to the class labels you want to test using test_custom.

summary_adjust

A list of parameters on how to adjust the p-values; this also affects which phenotypes are tested. The elements in the list are:

  • adjust_custom: "byLayer"; this is a string (corresponding to an option in p.adjust) or a function used to adjust p-values.

  • btwn_test_custom: "t"; see test_custom in summary_pars; this statistical significance test is used in the filters.

  • adjust0_lim: see fg_get_summary.

  • filter_adjust0: see fg_get_summary.

  • filter_es: see fg_get_summary.

  • filter_btwn_tpthres: see fg_get_summary.

  • filter_btwn_es: see fg_get_summary.

save_plots

A logical indicating whether or not to save plots.

Details

All node and edge features are trimmed such that only the significant phenotypes are left; the original input is stored in the slot etc$original_count of the returned flowGraph object.

Value

flowGraph object

Examples

## Not run: 
if(interactive()){
  data(fg_data_pos2)
  fg <- flowGraph(fg_data_pos2$count, meta=fg_data_pos2$meta, no_cores=1)
 }

## End(Not run)

aya49/flowGraph documentation built on Feb. 4, 2024, 6:40 p.m.