Learn R Programming

TransProR (version 1.0.2)

get_gtex_exp: Get GTEx Expression Data for Specific Organ

Description

This function retrieves gene expression data from the GTEx project that is specific to a certain organ. It performs various checks and processing steps to ensure that the data is consistent and relevant to the specified organ. The filtered and cleaned data is saved as an RDS file for further analysis.

Usage

get_gtex_exp(
  organ_specific,
  file_path,
  probe_map_path,
  pheno_path,
  output_path
)

Value

A data frame containing gene expression data for the specified organ. Rows represent genes, and columns represent samples. Note that this function also saves the organ-specific GTEx data as an RDS file at the specified output path.

Arguments

organ_specific

A character string specifying the organ to filter the gene expression data by.

file_path

A character string specifying the path to the GTEx gene expression data file.

probe_map_path

A character string specifying the path to the gtex_probeMap_gencode data file.

pheno_path

A character string specifying the path to the GTEx phenotype data file.

output_path

A character string specifying the path where the output RDS file will be saved.

Details

The function begins by checking if the gene expression and phenotype data files exist at the specified paths. It then loads these data files and processes them by setting appropriate row names, modifying column names for clarity, and filtering samples based on the specified organ. The function ensures that only samples present in both datasets are retained for consistency. It also removes any duplicate gene entries to prevent redundancy. Finally, the processed data is saved as an RDS file.