View source: R/MergeGtexTcga.R
merge_gtex_tcga | R Documentation |
This function merges gene expression data obtained from the GTEx (Genotype-Tissue Expression) and TCGA (The Cancer Genome Atlas) datasets. It is assumed that both datasets are in '.rds' format and have genes as row names. The merged dataset is saved as an RDS file at the specified output path.
merge_gtex_tcga(
gtex_data_path,
tcga_exp_path,
output_path = "./merged_gtex_tcga_data.rds"
)
gtex_data_path |
A string that specifies the file path to the GTEx data saved in RDS format. |
tcga_exp_path |
A string that specifies the file path to the TCGA expression data saved in RDS format. This should be a data.frame with rows as genes and columns as samples. |
output_path |
A string that specifies the path where the merged dataset should be saved. The file is saved in '.rds' format. The default path is "./merged_gtex_tcga_data.rds". |
It is assumed that both datasets are in '.rds' format and have genes as row names.
A data frame where rows represent genes and columns represent samples. The data frame contains expression values from both GTEx and TCGA datasets. It saves the merged dataset to the path specified by 'output_path'.
CRITICAL: The 'output_path' parameter must end with '.rds' to be properly recognized by the function. It is also highly recommended that the path includes specific identifiers related to the target samples. Please structure the 'output_path' following this pattern: './your_directory/merged.your_sample_type.gtex.tcga.data.rds'.
tumor_file <- system.file("extdata",
"removebatch_SKCM_Skin_TCGA_exp_tumor_test.rds",
package = "TransProR")
Normal_file <- system.file("extdata",
"removebatch_SKCM_Skin_Normal_TCGA_GTEX_count_test.rds",
package = "TransProR")
ouput_file <- file.path(tempdir(), "all_data.rds")
all_data <- merge_gtex_tcga(gtex_data_path = tumor_file,
tcga_exp_path = Normal_file,
output_path = ouput_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.