Learn R Programming

TransProR (version 1.0.2)

get_tcga_exp: TCGA Expression Data Processing

Description

This function processes expression data and phenotype information, separates tumor and normal samples, and saves the results into different files. It's specifically designed for data obtained from TCGA.

Usage

get_tcga_exp(
  counts_file_path,
  gene_probes_file_path,
  phenotype_file_path,
  output_file_path
)

Value

A list containing matrices for tumor and normal expression data.

Arguments

counts_file_path

File path to the counts data (usually in the form of a large matrix with gene expression data).

gene_probes_file_path

File path containing the gene probes data.

phenotype_file_path

File path to the phenotype data, which includes various sample attributes.

output_file_path

Path where the output files, distinguished between tumor and normal, will be saved.

Author

Dongyue Yu

Examples

Run this code
counts_file <- system.file("extdata", "TCGA-SKCM.htseq_counts_test.tsv", package = "TransProR")
gene_probes_file <- system.file("extdata",
                                "TCGA_gencode.v22.annotation.gene.probeMap_test",
                                package = "TransProR")
phenotype_file <- system.file("extdata", "TCGA-SKCM.GDC_phenotype_test.tsv", package = "TransProR")
ouput_file <- file.path(tempdir(), "SKCM_Skin_TCGA_exp_test.rds")

SKCM_exp <- get_tcga_exp(
  counts_file_path = counts_file,
  gene_probes_file_path = gene_probes_file,
  phenotype_file_path = phenotype_file,
  output_file_path = ouput_file
)
head(SKCM_exp[["tumor_tcga_data"]])[1:5, 1:5]
head(SKCM_exp[["normal_tcga_data"]], n = 10) # Because there is only one column.

Run the code above in your browser using DataLab