mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
Add CMap dataset
This commit is contained in:
parent
375c5b27ba
commit
6ef80483d2
7 changed files with 57 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ Description: This package contains precomputed data including comparisons in
|
|||
License: AGPL (>= 3)
|
||||
Encoding: UTF-8
|
||||
Roxygen: list(markdown = TRUE)
|
||||
RoxygenNote: 7.2.1
|
||||
RoxygenNote: 7.3.1
|
||||
Depends:
|
||||
R (>= 2.10)
|
||||
LazyData: true
|
||||
|
|
|
|||
3
R/data.R
3
R/data.R
|
|
@ -10,3 +10,6 @@
|
|||
#' The results from the analysis across Human Protein Atlas' tissue aggregated
|
||||
#' data.
|
||||
"hpa_tissues"
|
||||
|
||||
#' The results from the analysis on CMap data.
|
||||
"cmap"
|
||||
|
|
@ -9,6 +9,8 @@ server <- function(custom_dataset = NULL) {
|
|||
ubigen::hpa_tissues
|
||||
} else if (input$dataset == "gtex_all") {
|
||||
ubigen::gtex_all
|
||||
} else if (input$dataset == "cmap") {
|
||||
ubigen::cmap
|
||||
} else {
|
||||
custom_dataset
|
||||
}
|
||||
|
|
|
|||
3
R/ui.R
3
R/ui.R
|
|
@ -26,7 +26,8 @@ ui <- function(custom_dataset = NULL) {
|
|||
choices <- list(
|
||||
"GTEx (across tissues and conditions)" = "gtex_all",
|
||||
"GTEx (across tissues)" = "gtex_tissues",
|
||||
"Human Protein Atlas (across tissues)" = "hpa_tissues"
|
||||
"Human Protein Atlas (across tissues)" = "hpa_tissues",
|
||||
"CMap" = "cmap"
|
||||
)
|
||||
|
||||
if (!is.null(custom_dataset)) {
|
||||
|
|
|
|||
BIN
data/cmap.rda
Normal file
BIN
data/cmap.rda
Normal file
Binary file not shown.
16
man/cmap.Rd
Normal file
16
man/cmap.Rd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/data.R
|
||||
\docType{data}
|
||||
\name{cmap}
|
||||
\alias{cmap}
|
||||
\title{The results from the analysis on CMap data.}
|
||||
\format{
|
||||
An object of class \code{data.table} (inherits from \code{data.frame}) with 12382 rows and 17 columns.
|
||||
}
|
||||
\usage{
|
||||
cmap
|
||||
}
|
||||
\description{
|
||||
The results from the analysis on CMap data.
|
||||
}
|
||||
\keyword{datasets}
|
||||
33
scripts/cmap.R
Normal file
33
scripts/cmap.R
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
library(data.table)
|
||||
library(gprofiler2)
|
||||
library(here)
|
||||
|
||||
i_am("scripts/cmap.R")
|
||||
|
||||
# Source: custom
|
||||
load(here("scripts", "input", "CMap_20180808.RData"))
|
||||
|
||||
data <- CMap$"HT_HG-U133A"
|
||||
rm(CMap)
|
||||
|
||||
transcripts <- dimnames(data)$transcripts
|
||||
genes <- gconvert(
|
||||
transcripts,
|
||||
numeric_ns = "ENTREZGENE_ACC",
|
||||
mthreshold = 1,
|
||||
filter_na = FALSE
|
||||
)$target
|
||||
dimnames(data)[[1]] <- genes
|
||||
|
||||
d <- as.data.table(data)
|
||||
d <- na.omit(d)
|
||||
d <- d[data == "logMean", .(transcripts, drugs, value)]
|
||||
|
||||
setnames(
|
||||
d,
|
||||
c("transcripts", "drugs", "value"),
|
||||
c("gene", "sample", "expression")
|
||||
)
|
||||
|
||||
cmap <- ubigen::analyze(d)
|
||||
usethis::use_data(cmap, overwrite = TRUE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue