Git Product home page Git Product logo

genomicsupersignature's Issues

Allow configurable number of PCs in `validate`

.loadingCor <- function(dataset, avgLoading, method = "pearson", scale = FALSE) {
if (any(class(dataset) == "ExpressionSet")) {
dat <- Biobase::exprs(dataset)
} else if (any(class(dataset) %in% c("SummarizedExperiment", "RangedSummarizedExperiment"))) {
dat <- SummarizedExperiment::assay(dataset)
} else if (any(class(dataset) == "matrix")) {
dat <- dataset
} else {
stop("'dataset' should be one of the following objects: ExpressionSet,
SummarizedExperiment, RangedSummarizedExperiment, and matrix.")
}
if (isTRUE(scale)) {dat <- rowNorm(dat)} # row normalization
dat <- dat[apply(dat, 1, function (x) {!any(is.na(x) | (x==Inf) | (x==-Inf))}),]
gene_common <- intersect(rownames(avgLoading), rownames(dat))
prcomRes <- stats::prcomp(t(dat[gene_common,])) # centered, but not scaled by default
loadings <- prcomRes$rotation[, 1:8]
loading_cor <- abs(stats::cor(avgLoading[gene_common,], loadings[gene_common,],
use = "pairwise.complete.obs",
method = method))
return(loading_cor)
}

How to create new models?

Hi,

Is it possible to create new models based on GenomicSuperSignature? Let's say for example, using GTEx as and input and different prior knowledge.

Questions about R version in this research

Hi, I tried to run the codes related to RAV model building and met errors related to package installation. My R version is 4.1.3.
image
For the GF package, I cannot install it based on my R. Therefore, could you please share the version of your software? Thanks a lot.

Allow pluggable similarity measure to `validate`.

  • Spearman
  • other methods from dist
  • straight function

.loadingCor <- function(dataset, avgLoading, method = "pearson", scale = FALSE) {
if (any(class(dataset) == "ExpressionSet")) {
dat <- Biobase::exprs(dataset)
} else if (any(class(dataset) %in% c("SummarizedExperiment", "RangedSummarizedExperiment"))) {
dat <- SummarizedExperiment::assay(dataset)
} else if (any(class(dataset) == "matrix")) {
dat <- dataset
} else {
stop("'dataset' should be one of the following objects: ExpressionSet,
SummarizedExperiment, RangedSummarizedExperiment, and matrix.")
}
if (isTRUE(scale)) {dat <- rowNorm(dat)} # row normalization
dat <- dat[apply(dat, 1, function (x) {!any(is.na(x) | (x==Inf) | (x==-Inf))}),]
gene_common <- intersect(rownames(avgLoading), rownames(dat))
prcomRes <- stats::prcomp(t(dat[gene_common,])) # centered, but not scaled by default
loadings <- prcomRes$rotation[, 1:8]
loading_cor <- abs(stats::cor(avgLoading[gene_common,], loadings[gene_common,],
use = "pairwise.complete.obs",
method = method))
return(loading_cor)
}

'droplist' for `drawWordcloud()` function

Add a 'droplist' argument to drawWordcloud() function, which removes most and least common MeSH terms in the universe to avoid 'outliers' skew the word cloud.

e.g. droplist = c("Human", "RNA sequencing", ..., "Publication", "Utah")

Questions about heatmap table function

Hi, I found that this step took me a pretty long time to run:
image
I waited for more than one hour with one 30 GB GPU from an HPC. Is it normal? Thanks a lot.

Simplify browsing of studies

Currently, looking up which studies contributed to a RAV requires something like the following:

> ravc2 <- GenomicSuperSignature::getModel(prior = "C2")
> colData(ravc2)[colData(ravc2)$RAV == "RAV272", "studies"] 
$Cl4764_272
[1] "ERP020977" "SRP039361" "SRP045352"

And then searching for the accession numbers e.g. in the European Nucleotide Browser. And it's more difficult to find the PMIDs of studies contributing to the RAV.

It would be very convenient to have a function that outputs these directly, either with a message saying to search them in the European Nucleotide Browser or giving a direct link (e.g. https://www.ebi.ac.uk/ena/browser/view/ERP020977 for the first ERP above, although ENA browser annoyingly takes you down to the "reads" section of the page). Being able to browse PMIDs of the studies would also be very useful.

documentation on normalization are unclear

It's not clear from ?validate whether users should normalize their data in advance. As I understand from the code, no normalization is done except for z-score if scale = TRUE, so users should do a log(x+1) transformation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.