Generate unified gene-level feature data

gcap.collapse2Genes(
  fts,
  extra_info = NULL,
  include_type = FALSE,
  fix_type = TRUE,
  genome_build = c("hg38", "hg19", "mm10"),
  overlap = 1
)

Arguments

fts

(modified) result from gcap.extractFeatures()

extra_info

(optional) a data.frame with 3 columns 'sample', 'age' and 'gender', for including cancer type, check parameter include_type. For gender, should be 'XX' or 'XY', also could be 0 for 'XX' and 1 for 'XY'.

include_type

if TRUE, a fourth column named 'type' should be included in extra_info, the supported cancer type should be described with TCGA cancer type abbr..

fix_type

default is TRUE, only cancer types used in pre-trained models are used, others will be convert to NA. If FALSE, only generating one-hot encoding for cancer types in input data.

genome_build

genome build version, should be one of 'hg38', 'hg19'.

overlap

the overlap percentage on gene.

Value

a data.table.