R/chmi.07_list_traits.descriptions.R

Defines functions chmi.l_traits.descriptions

#----------------------------
# Descriptions in CHMI Study
#----------------------------

#' @export
chmi.l_traits.descriptions <- function(traits)
{
  ### pre-defined data
  covlist <- list(

    # chmi.l_traits.id()
	  original_id = c('original personal identification'),
    dataset = c('LACHMI (L1) or TUCHMI (T1, T2) studies'),
 
 
 		# chmi.l_traits.clinical()
    gender = c('gender of each individual'),
	  ppp_mal =	c('time from infection until first symptoms of clinical malaria'),
    ppp_time = c('time from infection until first positive parasitemia by thick blood smear (TBS)'),
    ppp_tbs = c('time from infection until first positive parasitemia by thick blood smear (TBS)'),
    ppp_mal_rtqpcr = c('time from infection until first positive malaria result by `RT_qpcr` or `qPCR`'),
    t_immuno = c('immune status applied only for LACHMI (L1) study'),
    immune_status = c('immune status with info about vaccine dosage for all CHMI'),
    status = c('immune status without info about vaccine dosage for all CHMI'),
    mal_exposure = c('immune status without info about vaccine dosage for all CHMI'),
    group = c('haemoglobin status in LACHMI (L1) individuals (IA or HbAA and IS or Hb AS)'),
    hb_status = c('haemoglobin status in malaria (AA or HbAA and AS or HbAS)'),
    mal_pos = c('presence (1)/absence (0) malaria disease'),
    tbs_pos  = c('positive (1)/negative (0) thick blood smear (TBS)'),
    pcr_pos = c('positive (1)/negative (0) qPCR assay'),
    height = c('height of each individual'),
    weight = c('weight of each individual'),
    dose = c('dosage of PfSPZ received only for TUCHMI (T1, T2) studies'),
    allocation = c('type of dose they received (true dose or `verum` and mock dose or `placebo`)'),
    chmi = c('infected (1)/not infected (0) by PfSPZ'),
    protection = c('protected (1)/not protected (0) by PfSPZ-CVac'),
    route = c('unknown'),
    t2_parasit = c('unknown'),
    t2_malaria = c('unknown'),
    l1_malaria = c('unknown'),
		vaccine = c('vaccine dosage info'),
		gr_hbs = c('haemoglobin status in malaria (naive, AA or HbAA or AS HbAS)'),
    gr2_hb = c('sickle cells status in malaria (naive or A_)'),
 
    
  	# chmi.l_traits.ab()
		t_igg = c('immunoglobulin isotype measured'),
    antigen = c('type of antigen measured (rolled into `chmiddbb` readme.md file'),
    study_number = c('number of individual into the study'),
    t_point = c('original time point for each CHMI study'),
    plate = c('plate position of the individuals of CHMI study'),
    batch = c('correction by sampling time of the plate'),
    mfi = c('mean fluorescence intensity (MFI)'),
    min_half = c('half minimum MFI by isotype and antigen'),
    mfi_imp = c('imputated MFI in negative positives'),
    dil = c('dilution'),
    mfi_adj = c('MFI adjusted by dilution'),
    mean_ratio = c('MFI imputed by original MFI ratio'),
    mfi_corr = c('MFI corrected by mean_ratio'),
    log10_mfi = c('log10 transformation of MFI variable'),
    t2_point = c('modified time point for `ab_data` analyses'),
    fc_mfic = c('ratio value of `mfi_corr[[t_point == D7]] vs `mfi_corr[[t_point == C_1]]'),
    fc_mfic_c1 = c('MFI corrected by mean_ratio at `t_point == C_1`'),
    fc_log10_mfi = c('fc_log10_mfi == log10(fc_mfic)'),
    
    
    # chmi.l_traits.pbmc()
    date = c('sampling date'), 
   	ct_marker = c('marker analyzed (CD1c, IgG, IgM, PD1 or total Bcell population)'),
   	cell_population = c('Bcell population type'),
    ct_value = c('percentage (%) of the cells'),
    fact_marker = c('check variable to split markers'),
    rt_value_c1 = c('ct_value at `t_point == C_1`'),
    rt_value = c('ratio value at `ct_value[[t_point == C_1]]` vs `ct_value[[t_point == D7]]`'))
		
	### select traits
  if(!missing(traits)) {
    stopifnot(all(traits %in% names(covlist)))
    covlist <- covlist[[traits]]

  ### case of a single trait
  if(length(traits)) {
    covlist <- unlist(covlist)
    }
  }
  return(covlist)
}
mvazquezs/chmitools documentation built on May 1, 2020, 2:06 a.m.