R/preprocess_pheno_germany.R

Defines functions preprocess_pheno_germany

Documented in preprocess_pheno_germany

#' Preprocess Germany Pheno Data
#' Gene Expression - RNASeq
#' @param counts
#'
#' @return
#' @export
#'
#' @examples
preprocess_pheno_germany <- function(counts) {
  pheno <- data.frame(sample_id = colnames(counts)[-1])
  pheno$volunteer_id <- sapply(strsplit(pheno$sample_id, '_'), `[[`, 1)
  pheno$sampling_day <- sapply(strsplit(pheno$sample_id, '_'), `[[`, 2)
  pheno$sampling_day <- as.numeric(gsub("d", "", pheno$sampling_day))
  return ( pheno )
}
FernandoMarcon/REbola documentation built on April 4, 2022, 12:49 a.m.