mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
Add GTEx tissues dataset
This commit is contained in:
parent
510fafeb6e
commit
c14208c2b2
7 changed files with 49 additions and 4 deletions
23
scripts/gtex_tissues.R
Normal file
23
scripts/gtex_tissues.R
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
library(data.table)
|
||||
library(here)
|
||||
|
||||
i_am("scripts/gtex_tissues.R")
|
||||
|
||||
# Source: https://storage.googleapis.com/gtex_analysis_v8/rna_seq_data/GTEx_Analysis_2017-06-05_v8_RNASeQCv1.1.9_gene_median_tpm.gct.gz
|
||||
data <- fread(here("scripts", "input", "gtex_tissues.tsv"))
|
||||
data[, Description := NULL]
|
||||
setnames(data, "Name", "gene")
|
||||
|
||||
# Remove Ensembl gene version numbers.
|
||||
data[, gene := stringr::str_split(gene, "\\.") |> purrr::map_chr(1)]
|
||||
|
||||
data <- melt(
|
||||
data,
|
||||
id.vars = "gene",
|
||||
variable.name = "sample",
|
||||
value.name = "expression",
|
||||
variable.factor = FALSE
|
||||
)
|
||||
|
||||
gtex_tissues <- ubigen::analyze(data)
|
||||
usethis::use_data(gtex_tissues, overwrite = TRUE)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
library(data.table)
|
||||
library(here)
|
||||
|
||||
i_am("scripts/hpa.R")
|
||||
i_am("scripts/hpa_tissues.R")
|
||||
|
||||
# Source: https://www.proteinatlas.org/download/rna_tissue_hpa.tsv.zip
|
||||
data <- fread(here("scripts", "input", "rna_tissue_hpa.tsv"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue