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

Doc: Custom Functions

kmorrisongr edited this page Feb 17, 2020 · 2 revisions

Collection of functions that are specific to your dataset

ED608 Convert Feature String To Nicer String

cust_ed608_pretty_title(compound_feat)

  • A function that takes in an ugly Fc Array compound title and makes it nicer. Useful if you want axis labels/plot titles that aren't ugly. Replaces '.' in the first substring with '-', and '.' in the second substring with ' ' (whitespace). A couple special cases ("gp41.Ectodomain..HIV.1.") are hard-coded.
  • @param compound_feat A feature string that is ugly and contracted with excess periods, etc. Must be concatenated using underscores.
  • @return The new feature string.

ED608 Bin Subjects By Challenge Information

cust_ed608_bin(fc, surv, new_groups=c("SUSC", "RES"))

  • Regroup subjects based on whether the survived/remained uninfected for greater or less than the median number of challenges.
  • @param fc The Fc Array data frame.
  • @param surv The survival information data frame. Should contain subject id, challenge to infection, and infection status.
  • @param new_groups The new group labels you wish to use.
  • @return The Fc Array data frame with the group information replaced with the new group assignments.

RV144 Bin Subjects By Challenge Information

cust_rv144_bin(fc, samples, surv)

  • Regroup subjects based on whether the survived/remained uninfected for greater or less than the median number of challenges.
  • @param fc The Fc Array data frame.
  • @param samples The sample mapping informatin data frame. Used for converting sample aliases (4.6.6, etc.) to PIDs, which is what survival information is paired with.
  • @param surv The survival information data frame. Should contain subject id, challenge to infection, and infection status.
  • @return The Fc Array data frame with the group information replaced with the new group assignments.

Clone this wiki locally