Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Doc: Multi Fc Functions

kmorrisongr edited this page Feb 17, 2020 · 1 revision

Generate Groupwise Combinations Of Fc Arrays

fcmu_fcs_combs(fc, order, num_groups)

  • Generate a list of data frames that each consist of only two treatment groups. Makes many group comparisons easier when paired with for loops.
  • @param fc The Fc Array data frame.
  • @param order Determines what order the data frames are in the list
    • "groups" (g1v2a, g1v2b, g1v3a, g1v3b, g2v3a, g2v3b, etc...).
    • "times" (g1v2a, g1v3a, g2v3a, g1v2b, g1v3b, g2v3b, etc...).
  • @param num_groups The number of groups to represent in each entry in the returned list. For example, 2 would mean all pairwise combinations of groups would be represented.
  • @return A list of Fc Array data frames, each with only num_groups represented. Returns NULL if it encountered an error.

Find y-limits For Many Data Frames

fcmu_fcs_find_ylim(data_list, clm)

  • Find the y-limits that will encompass all of the data present in the data frames in the list. Allows plots to be drawn with the same y-limits, making visual inspection and comparison easier and less dubious.
  • @param data_list A list of data frames.
  • @param clm Which column in each data frame you are interested in.
  • @return A vector of y-limits c(lower, upper). If, for some reason, no y-limits were found, you get back NULL and an error is written. If only a y-maximum was found, the y-minimum is set to 0 and you get back c(0, y_max).

Perform fcst_mannwhit On Many Fc Array Datasets

fcmu_fcs_mannwhit(fcs, adj_method, alternative="two.sided")

  • For each feature in each Fc Array data frame, perform the Mann-Whitney U (Wilcoxon Rank-Sum) test to test the null hypothesis that a randomly selected value from one population (group) will be less than or greater than a randomly selected value from a second population (group). Here, this is to test whether the two sets of samples, which should be independent (treatment group A should not have an impact on treatment group B), were selected from populations having the same distribution, and there thus being no difference in the groups.
  • @param fcs A list of Fc Array data frames. Each data frame should have just one time point and just two groups. The names of the entries in fcs should be a contraction of the groups you are comparing, separated by an underscore.
  • @param results_dir A string representing the directory where you want to store the results of your analyses.
  • @param adj_method The method you want to use to adjust p-values. Use "none" as a passthrough.
  • @param alternative What alternative hypothesis we're testing. Supports "two.sided", "one.sided", and "either" (result of "two.sided"/2).
  • @return A list containing data frames for each corresponding Fc Array data frame in fcs. Each data frame has p-values for each feature (features are columns).

Perform fcst_fochs On Many Fc Array Datasets

fcmu_fcs_fochs(fcs, method=median)

  • For each feature in each Fc Array data frame, calculate the fold change between the measurements of one group and another using method. Which group is the numerator is determined by the structure of comp_name.
  • @param fcs A list of Fc Array data frames. Each data frame should have just one time point and just two groups. The names of the entries in fcs should be a contraction of the groups you are comparing, separated by an underscore. The first group in this string will be the numerator in the fold change ratios.
  • @param method What method will be used to calculate fold change. The default is the median of each group's values.
  • @return A list containing data frames for each corresponding Fc Array data frame in fcs. Each data frame has fold change values for each feature (features are columns).

Clone this wiki locally