Found 28210 results in 1516 files, showing top 50 files (show more).
GenomicRanges:R/GPos-class.R: [ ] |
---|
189: Class <- sub("IPos$", "GPos", as.character(class(pos)))
|
395: .COL2CLASS <- c(
|
400: classinfo <- makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
|
35: "Starting with BioC 3.10, the class attribute of all ",
|
43: if (class(x) == "GPos")
|
64: ### IRanges/R/IPos-class.R for what that means), they are also on the same
|
188: ## class name returned by class(pos).
|
191: new_GRanges(Class, seqnames=seqnames, ranges=pos, strand=strand,
|
220: class(from) <- "UnstitchedGPos" # temporarily broken instance!
|
228: class(from) <- "StitchedGPos" # temporarily broken instance!
|
252: ### FROM THE TARGET CLASS! (This is a serious flaw in as() current
|
264: class(from) <- "GRanges" # temporarily broken instance!
|
277: ### CTSS class in the CAGEr package) need to define a coercion method to
|
315: if (class(object) != "GPos")
|
330: message("[updateObject] ", class(object), " object ",
|
341: if (class(object) == "GPos") {
|
343: message("[updateObject] Settting class attribute of GPos ",
|
345: class(object) <- class(new("StitchedGPos"))
|
351: class(object), " object is current.\n",
|
384: stop(c(wmsg("This ", class(x), " object uses internal representation ",
|
7: setClass("GPos",
|
15: setClass("UnstitchedGPos",
|
22: setClass("StitchedGPos",
|
380: print.classinfo=FALSE, print.seqinfo=FALSE)
|
394: if (print.classinfo) {
|
402: stopifnot(identical(colnames(classinfo), colnames(out)))
|
403: out <- rbind(classinfo, out)
|
419: show_GPos(object, print.classinfo=TRUE, print.seqinfo=TRUE)
|
375: setMethod("makeNakedCharacterMatrixForDisplay", "GPos",
|
391: ## makePrettyMatrixForCompactPrinting() assumes that head() and tail()
|
393: out <- makePrettyMatrixForCompactPrinting(x)
|
trio:R/qingInternal.R: [ ] |
---|
7782: class = unlist(lapply(elm, FUN=class))
|
7773: class.last = NULL
|
9892: anyMatrix = inMatrix[,colVec]
|
3071: if(class(data[,m[i]])=="factor") data[,i]=as.character(data[,m[i]])
|
3074: if(class(data[,m[i]])=="factor") data[,i]=as.numeric(as.character(data[,m[i]]))
|
3077: if(class(data[,m[i]])=="factor") data[,i]=as.numeric(as.character(data[,m[i]]))
|
7793: if(length(class.last)==length(class)){
|
7794: all.m = class.last==class
|
7795: if(sum(all.m)!=length(class)) search=FALSE
|
7809: class.last=class
|
7810: class=NULL
|
7818: reStr = paste(c("name", "class", "length"),
|
7819: c("", class.last[1], len.last[1]),
|
7822: reStr = paste(c("name", "class", "length"),
|
7823: c(names.last[1], class.last[1], len.last[1]),
|
9415: if(class(data[,i])=="factor") data[,i]=as.numeric(as.character(data[,i]))
|
9836: util.listMatrix.2matrix <-
|
9890: function(inMatrix, colVec, discIn=NULL, discVec=NULL, delimVec, digitVec, missingVec=NULL){
|
9893: mRow = dim(anyMatrix)[1]
|
9894: mCol = dim(anyMatrix)[2]
|
9899: re[,1]= inMatrix[,discIn]
|
9906: num = anyMatrix[row, col]
|
Pi:R/xMLcaret.r: [ ] |
---|
88: class <- as.factor(gs_targets[!is.na(ind)])
|
87: df_predictor_class <- as.data.frame(df_predictor[ind[!is.na(ind)],])
|
102: ...(4 bytes skipped)...Control <- caret::trainControl(method=c("repeatedcv","cv","oob")[1], number=nfold, repeats=nrepeat, classProbs=TRUE, summaryFunction=caret::twoClassSummary, allowParallel=FALSE)
|
3: ...(348 bytes skipped)... in rows and predictors in columns, with their predictive scores inside it. It returns an object of class 'sTarget'.
|
10: ...(71 bytes skipped)...idataion. Per fold creates balanced splits of the data preserving the overall distribution for each class (GSP and GSN), therefore generating balanced cross-vallidation train sets and testing sets. By defa...(44 bytes skipped)...
|
18: #' an object of class "sTarget", a list with following components:
|
20: #' \item{\code{model}: an object of class "train" as a best model}
|
29: #' \item{\code{evidence}: an object of the class "eTarget", a list with following components "evidence" and "metag"}
|
85: ## predictors + class
|
89: levels(class) <- c("GSN","GSP")
|
90: df_predictor_class$class <- class
|
94: ...(40 bytes skipped)...ds (%d in GSP, %d in GSN) are used for supervised integration of %d predictors/features (%s).", sum(class=="GSP"), sum(class=="GSN"), ncol(df_predictor), as.character(now)), appendLF=TRUE)
|
119: fit_gbm <- caret::train(class ~ .,
|
120: data = df_predictor_class,
|
158: fit_svm <- caret::train(class ~ .,
|
159: data = df_predictor_class,
|
195: fit_rda <- caret::train(class ~ .,
|
196: data = df_predictor_class,
|
231: fit_knn <- caret::train(class ~ .,
|
232: data = df_predictor_class,
|
267: fit_pls <- caret::train(class ~ .,
|
268: data = df_predictor_class,
|
305: suppressMessages(fit_nnet <- caret::train(class ~ .,
|
306: data = df_predictor_class,
|
346: fit_rf <- caret::train(class ~ .,
|
347: data = df_predictor_class,
|
384: class = c("numeric", 'numeric'),
|
446: fit_myrf <- caret::train(class ~ .,
|
447: data = df_predictor_class,
|
486: fit_crf <- caret::train(class ~ .,
|
487: data = df_predictor_class,
|
524: fit_glmnet <- caret::train(class ~ .,
|
525: data = df_predictor_class,
|
556: fit_glm <- caret::train(class ~ .,
|
557: data = df_predictor_class,
|
589: fit_bglm <- caret::train(class ~ .,
|
590: data = df_predictor_class,
|
627: fit_blr <- caret::train(class ~ .,
|
628: data = df_predictor_class,
|
669: fit_xgbl <- caret::train(class ~ .,
|
670: data = df_predictor_class,
|
712: fit_xgbt <- caret::train(class ~ .,
|
713: data = df_predictor_class,
|
792: ...(54 bytes skipped)...atrix of %d rows/genes X %d columns/repeats*folds, aggregated via '%s' (%s) ...", nrow(df_predictor_class), nfold*nrepeat, aggregateBy, as.character(now)), appendLF=TRUE)
|
917: class(sTarget) <- "sTarget"
|
34: #' @seealso \code{\link{xPierMatrix}}, \code{\link{xPredictROCR}}, \code{\link{xPredictCompare}}, \code{\link{xSparseMatrix}}, \code{\link{xSymbol2GeneID}}
|
57: df_predictor <- xPierMatrix(list_pNode, displayBy="score", combineBy="union", aggregateBy="none", RData.location=RData.location...(12 bytes skipped)...
|
61: eTarget <- xPierMatrix(list_pNode, displayBy="evidence", combineBy="union", aggregateBy="none", verbose=FALSE, RData.locat...(30 bytes skipped)...
|
103: fitControl_withoutParameters <- caret::trainControl(method="none", classProbs=TRUE, allowParallel=FALSE)
|
381: type = "Classification",
|
394: fit = function(x, y, wts, param, lev, last, classProbs, ...) {
|
432: levels = function(x) x$classes,
|
818: df_full <- as.matrix(xSparseMatrix(df_full, verbose=FALSE))
|
GRaNIE:R/core.R: [ ] |
---|
5444: d = tibble::add_row(d, r_positive = r_pos, class = classCur, peak_gene.p.raw.class = pclassCur, n = 0)
|
707: peak.GC.class = cut(.data$`G|C`, breaks = seq(0,1,1/nBins), include.lowest = TRUE, ordered_result = TRUE)) %>%
|
916: peaks_GC_class = cut(GC_data.df$peak.GC.perc, breaks = seq(0,1,1/nBins), include.lowest = TRUE, ordered_result = T...(4 bytes skipped)...
|
458: .storeAsMatrixOrSparseMatrix <- function (GRN, df, ID_column, slotName, threshold = 0.1) {
|
741: .normalizeCountMatrix <- function(GRN, data, normalization, additionalParams =list()) {
|
4745: classPeaks = class(GRN@data$peaks$counts)
|
4758: classRNA = class(GRN@data$RNA$counts)
|
5439: for (classCur in networkType_details){
|
5492: classAll = c(as.character(d2$class), d3$r_positive),
|
2780: GC_class.cur = GC_classes_foreground.df$GC_class[i]
|
5521: peak_gene.p.raw.class.bin = as.numeric(.data$peak_gene.p.raw.class)) %>%
|
719: GC_classes.df = GC.data %>%
|
1585: TFBS_bindingMatrix.df = tibble::as_tibble(res.l)
|
2040: AR_classification_wrapper<- function (GRN, significanceThreshold_Wilcoxon = 0.05,
|
2476: GC_classes_foreground.df = peaksForeground %>%
|
2484: GC_classes_background.df = peaksBackground %>%
|
2531: GC_classes_all.df = dplyr::full_join(GC_classes_foreground.df, GC_classes_background.df, suffix = c(".fg",".bg"), by = "GC_class") %>%
|
5532: .classFreq_label <- function(tbl_freq) {
|
5440: for (pclassCur in levels(peakGeneCorrelations.all.cur$peak_gene.p.raw.class)) {
|
3: #' Create and initialize an empty \code{\linkS4class{GRN}} object.
|
15: #' @return Empty \code{\linkS4class{GRN}} object
|
126: #' Add data to a \code{\linkS4class{GRN}} object.
|
128: #' This function adds both RNA and peak data to a \code{\linkS4class{GRN}} object, along with data normalization.
|
168: #' @return An updated \code{\linkS4class{GRN}} object, with added data from this function (e.g., slots \code{GRN@data$peaks} and \code{GRN@d...(9 bytes skipped)...
|
471: fractionZero = (length(df.m) - Matrix::nnzero(df.m)) / length(df.m)
|
720: dplyr::group_by(.data$peak.GC.class) %>%
|
723: tidyr::complete(.data$peak.GC.class, fill = list(n = 0)) %>%
|
727: #ggplot2::ggplot(GC.data, ggplot2::aes(GC.class)) + geom_histogram(stat = "count") + ggplot2::theme_bw()
|
729: #ggplot2::ggplot(GC_classes.df , ggplot2::aes(GC.class, n_rel)) + geom_bar(stat = "identity") + ggplot2::theme_bw()
|
919: GC_class = peaks_GC_class,
|
963: .gcqn <- function(data, GC_class, summary='mean', round=FALSE){
|
967: for(ii in 1:nlevels(GC_class)){
|
969: id <- which(GC_class==levels(GC_class)[ii])
|
1003: # for(ii in 1:nlevels(peaksAnnotation$peak.GC.class)){
|
1004: # id <- which(peaksAnnotation$peak.GC.class==levels(peaksAnnotation$peak.GC.class)[ii])
|
1096: #' Filter RNA-seq and/or peak data from a \code{\linkS4class{GRN}} object
|
1102: ...(166 bytes skipped)...s_peak_gene}}. \strong{This function does NOT (re)filter existing connections when the \code{\linkS4class{GRN}} object already contains connections. Thus, upon re-execution of this function with different ...(60 bytes skipped)...
|
1127: #' @return An updated \code{\linkS4class{GRN}} object, with added data from this function.
|
1382: #' Add TFBS to a \code{\linkS4class{GRN}} object.
|
1395: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function (\code{GRN@annotation$TFs} in pa...(9 bytes skipped)...
|
1520: #' Overlap peaks and TFBS for a \code{\linkS4class{GRN}} object
|
1525: #' @return An updated \code{\linkS4class{GRN}} object, with added data from this function (\code{GRN@data$TFs$TF_peak_overlap} in particular...(1 bytes skipped)...
|
1810: #' @return An updated \code{\linkS4class{GRN}} object, with added data from this function
|
1910: #' @return An updated \code{\linkS4class{GRN}} object, with added data from this function.
|
2024: #' Run the activator-repressor classification for the TFs for a \code{\linkS4class{GRN}} object
|
2034: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function.
|
2163: fileCur = paste0(outputFolder, .getOutputFileName("plot_class_density"), "_", connectionTypeCur, suffixFile, ".pdf")
|
2173: fileCur = paste0(outputFolder, .getOutputFileName("plot_class_medianClass"), "_", connectionTypeCur, suffixFile, ".pdf")
|
2186: fileCur = paste0(outputFolder, .getOutputFileName("plot_class_densityClass"), "_", connectionTypeCur, suffixFile, ".pdf")
|
2247: #' Add TF-peak connections to a \code{\linkS4class{GRN}} object
|
2265: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function.
|
2477: dplyr::group_by(.data$GC_class) %>%
|
2480: tidyr::complete(.data$GC_class, fill = list(n = 0)) %>%
|
2485: dplyr::group_by(.data$GC_class) %>%
|
2488: tidyr::complete(.data$GC_class, fill = list(n = 0)) %>%
|
2546: peaksBackgroundGCCur = peaksBackground %>% dplyr::filter(.data$GC_class == GC_classes_foreground.df$GC_class[i])
|
2785: dplyr::filter(.data$GC_class == GC_class.cur) %>%
|
2787: #futile.logger::flog.info(paste0(" GC.class ", GC.class.cur, ": Required: ", requiredNoPeaks, ", available: ", availableNoPeaks))
|
2792: #futile.logger::flog.info(paste0(" Mimicking distribution FAILED (GC class ", GC.class.cur, " could not be mimicked"))
|
2815: #' Add peak-gene connections to a \code{\linkS4class{GRN}} object
|
2839: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function.
|
3445: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function.
|
4060: #' Add TF-gene correlations to a \code{\linkS4class{GRN}} object.
|
4070: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function.
|
4324: ...(4 bytes skipped)...enerate a summary for the number of connections for different filtering criteria for a \code{\linkS4class{GRN}} object.
|
4343: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function.
|
4642: #' @return An small example \code{\linkS4class{GRN}} object
|
4709: #' Get counts for the various data defined in a \code{\linkS4class{GRN}} object
|
4711: #' Get counts for the various data defined in a \code{\linkS4class{GRN}} object.
|
4712: ...(10 bytes skipped)...{Note: This function, as all \code{get} functions from this package, does NOT return a \code{\linkS4class{GRN}} object.}
|
4726: ...(37 bytes skipped)... the type as indicated by the function parameters. This function does **NOT** return a \code{\linkS4class{GRN}} object.
|
4751: message = paste0("Unsupported class for GRN@data$peaks$counts. Contact the authors.")
|
4764: message = paste0("Unsupported class for GRN@data$RNA$counts. Contact the authors.")
|
4814: #' Extract connections or links from a \code{\linkS4class{GRN}} object as a data frame.
|
4818: ...(10 bytes skipped)...{Note: This function, as all \code{get} functions from this package, does NOT return a \code{\linkS4class{GRN}} object.}
|
4831: ...(5 bytes skipped)...eturn A data frame with the requested connections. This function does **NOT** return a \code{\linkS4class{GRN}} object. Depending on the arguments, the
|
5033: ...(0 bytes skipped)...#' Retrieve parameters for previously used function calls and general parameters for a \code{\linkS4class{GRN}} object.
|
5035: ...(10 bytes skipped)...{Note: This function, as all \code{get} functions from this package, does NOT return a \code{\linkS4class{GRN}} object.}
|
5041: #' @return The requested parameters. This function does **NOT** return a \code{\linkS4class{GRN}} object.
|
5087: #' @return An updated \code{\linkS4class{GRN}} object, with some slots being deleted (\code{GRN@data$TFs$classification} as well as \code{GRN@stats$connectionDetails.l})
|
5121: #' @return An updated \code{\linkS4class{GRN}} object, with the output directory being adjusted accordingly
|
5344: "plot_class_density" = "TF_classification_densityPlots",
|
5345: "plot_class_medianClass" = "TF_classification_stringencyThresholds",
|
5346: "plot_class_densityClass" = "TF_classification_summaryHeatmap",
|
5433: dplyr::group_by(.data$r_positive, class, .data$peak_gene.p.raw.class) %>%
|
5442: row = which(d$r_positive == r_pos & d$class == classCur & as.character(d$peak_gene.p.raw.class) == as.character(pclassCur))
|
5450: # Restore the "ordered" factor for class
|
5451: d$peak_gene.p.raw.class = factor(d$peak_gene.p.raw.class, ordered = TRUE, levels = levels(peakGeneCorrelations.all.cur$peak_gene.p.raw.class))
|
5456: dplyr::group_by(.data$r_positive, .data$class) %>%
|
5462: dplyr::group_by(class, .data$peak_gene.p.raw.class)%>%
|
5471: normFactor_real = dplyr::filter(dsum, class == !! (networkType_details[1])) %>% dplyr::pull(.data$sum_n) %>% sum() /
|
5472: dplyr::filter(dsum, class == !! (networkType_details[2])) %>% dplyr::pull(.data$sum_n) %>% sum()
|
5476: dplyr::group_by(.data$peak_gene.p.raw.class, .data$r_positive) %>%
|
5477: dplyr::summarise(n_real = .data$n[class == !! (names(colors_vec)[1]) ],
|
5478: n_permuted = .data$n[class == !! (names(colors_vec)[2]) ]) %>%
|
5486: stopifnot(identical(levels(d2$peak_gene.p.raw.class), levels(d3$peak_gene.p.raw.class)))
|
5489: d_merged <- tibble::tibble(peak_gene.p.raw.class = c(as.character(d2$peak_gene.p.raw.class),
|
5490: as.character(d3$peak_gene.p.raw.class)),
|
5495: peak_gene.p.raw.class = factor(.data$peak_gene.p.raw.class, levels = levels(d2$peak_gene.p.raw.class)))
|
5497: d4 = tibble::tibble(peak_gene.p.raw.class = unique(d$peak_gene.p.raw.class),
|
5504: row_d2 = which(d2$class == networkType_details[1] & d2$peak_gene.p.raw.class == d4$peak_gene.p.raw.class[i])
|
5508: row_d2 = which(d2$class == paste0("random_",range) & d2$peak_gene.p.raw.class == d4$peak_gene.p.raw.class[i])
|
5512: row_d3 = which(d3$r_positive == TRUE & d3$peak_gene.p.raw.class == d4$peak_gene.p.raw.class[i])
|
5514: row_d3 = which(d3$r_positive == FALSE & d3$peak_gene.p.raw.class == d4$peak_gene.p.raw.class[i])
|
5522: dplyr::arrange(.data$peak_gene.p.raw.class.bin)
|
5524: d4_melt = reshape2::melt(d4, id = c("peak_gene.p.raw.class.bin", "peak_gene.p.raw.class")) %>%
|
5577: ...(36 bytes skipped)...ources of biological and technical variation for features (TFs, peaks, and genes) in a \code{\linkS4class{GRN}} object
|
5597: #' @return An updated \code{\linkS4class{GRN}} object, with additional information added from this function to \code{GRN@stats$varianceParti...(111 bytes skipped)...
|
5655: coltypes = meta %>% dplyr::summarise_all(class)
|
87: # Stringencies for AR classification
|
93: # Colors for the different classifications
|
190: checkmate::assertClass(GRN, "GRN")
|
306: countsPeaks.norm.df = .normalizeCountMatrix(GRN, counts_peaks %>% tibble::column_to_rownames("peakID") %>% as.matrix(),
|
313: countsRNA.norm.df = .normalizeCountMatrix(GRN, counts_rna %>% tibble::column_to_rownames("ENSEMBL") %>% as.matrix(),
|
375: GRN@data$peaks$counts = .storeAsMatrixOrSparseMatrix(GRN, df = data.l[["peaks"]], ID_column = "peakID", slotName = "GRN@data$peaks$counts")
|
378: GRN@data$peaks$counts_raw = .storeAsMatrixOrSparseMatrix(GRN, df = counts_peaks %>% dplyr::select("peakID", tidyselect::one_of(GRN@config$sharedSamples)),
|
382: GRN@data$RNA$counts = .storeAsMatrixOrSparseMatrix(GRN, df = data.l[["RNA"]], ID_column = "ENSEMBL", slotName = "GRN@data$RNA$counts")
|
385: GRN@data$RNA$counts_raw = .storeAsMatrixOrSparseMatrix(GRN, df = counts_rna %>% dplyr::select("ENSEMBL", tidyselect::one_of(GRN@config$sharedSamples)),
|
476: df.m = .asSparseMatrix(df.m, convertNA_to_zero = FALSE,
|
568: countsPeaks.clean = getCounts(GRN, type = "peaks", permuted = FALSE, asMatrix = TRUE, includeFiltered = TRUE)
|
655: countsRNA.m = getCounts(GRN, type = "rna", permuted = FALSE, asMatrix = TRUE, includeFiltered = TRUE)
|
733: GRN@stats$peaks$GC = GC_classes.df
|
743: checkmate::assertMatrix(data)
|
754: dd <- suppressMessages(DESeq2::DESeqDataSetFromMatrix(countData = data,
|
992: # counts = getCounts(GRN, type = "peaks", asMatrix = TRUE, includeFiltered = TRUE)
|
1056: # dd <- DESeq2::DESeqDataSetFromMatrix(countData = countDataNew,
|
1144: checkmate::assertClass(GRN, "GRN")
|
1402: checkmate::assertClass(GRN, "GRN")
|
1535: checkmate::assertClass(GRN, "GRN")
|
1587: if (!all(colnames(TFBS_bindingMatrix.df) %in% GRN@config$allTF)) {
|
1599: GRN@data$TFs$TF_peak_overlap = TFBS_bindingMatrix.df %>%
|
1605: GRN@data$TFs$TF_peak_overlap = .asSparseMatrix(as.matrix(GRN@data$TFs$TF_peak_overlap),
|
1815: checkmate::assertClass(GRN, "GRN")
|
1842: countsPeaks = .normalizeCountMatrix(GRN@data$peaks$counts_orig, normalization = normalization)
|
1913: checkmate::assertClass(GRN, "GRN")
|
1968: countsNorm = .normalizeCountMatrix(data %>% dplyr::select(-"ENSEMBL"), normalization = normalization)
|
2022: ######## AR classification ########
|
2027: ...(47 bytes skipped)...c[0,1]. Default 0.05. Significance threshold for Wilcoxon test that is run in the end for the final classification. See the Vignette and *diffTF* paper for details.
|
2038: #' # GRN = AR_classification_wrapper(GRN, outputFolder = ".", forceRerun = FALSE)
|
2048: checkmate::assertClass(GRN, "GRN")
|
2062: GRN@data$TFs$classification$TF.translation.orig = GRN@annotation$TFs %>%
|
2086: if (is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]])) {
|
2087: if (is.null(GRN@data$TFs$classification[[permIndex]])) {
|
2088: GRN@data$TFs$classification[[permIndex]] = list()
|
2090: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]] = list()
|
2093: if (is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_foreground) |
|
2094: is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_background) |
|
2095: is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground) |
|
2096: is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background) |
|
2097: is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor) |
|
2101: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]] = list()
|
2124: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_foreground = res.l[["median_foreground"]]...(0 bytes skipped)...
|
2125: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_background = res.l[["median_background"]]...(0 bytes skipped)...
|
2126: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground = res.l[["foreground"]]
|
2127: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background = res.l[["background"]]
|
2129: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor = TF_peak_cor
|
2132: # Final classification: Calculate thresholds by calculating the quantiles of the background and compare the real ...(24 bytes skipped)...
|
2134: if (is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$act.rep.thres.l) | forceRerun) {
|
2135: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$act.rep.thres.l =
|
2136: .calculate_classificationThresholds(.asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background),
|
2140: if (is.null(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF.classification) | forceRerun) {
|
2142: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF.classification =
|
2144: output.global.TFs = GRN@data$TFs$classification$TF.translation.orig %>% dplyr::mutate(TF = .data$TF.name),
|
2145: median.cor.tfs = GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_foreground,
|
2146: act.rep.thres.l = GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$act.rep.thres.l,
|
2148: t.cor.sel.matrix = .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground),
|
2149: t.cor.sel.matrix.non = .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background),
|
2154: # PLOTS FOR THE RNA-SEQ CLASSIFICATION
|
2165: .plot_density(.asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground),
|
2166: .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background),
|
2176: median.cor.tfs = .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_foreground),
|
2177: median.cor.tfs.non = .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_background),
|
2179: act.rep.thres.l = GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$act.rep.thres.l,
|
2189: TF_peak_cor = GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor
|
2191: .plot_heatmapAR(TF.peakMatrix.df = peak_TF_overlapCur.df,
|
2196: median.cor.tfs = .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_foreground),
|
2197: median.cor.tfs.non = .asMatrixFromSparse(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_background),
|
2198: act.rep.thres.l = GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$act.rep.thres.l,
|
2199: finalClassification = GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF.classification,
|
2209: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_foreground = NULL
|
2210: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_cor_median_background = NULL
|
2211: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground = NULL
|
2212: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background = NULL
|
2213: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$act.rep.thres.l = NULL
|
2217: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground =
|
2218: .asSparseMatrix(as.matrix(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_foreground), convertNA_to_zero = TRUE)
|
2219: GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background =
|
2220: .asSparseMatrix(as.matrix(GRN@data$TFs$classification[[permIndex]] [[connectionTypeCur]]$TF_peak_cor_background), convertNA_to_zero = TRUE)
|
2282: checkmate::assertClass(GRN, "GRN")
|
2500: minPerc = .findMaxBackgroundSize(GC_classes_foreground.df, GC_classes_background.df, peaksBackground, threshold_percentage = threshold_percentage)
|
2544: for (i in seq_len(nrow(GC_classes_foreground.df))) {
|
2552: #Select the minimum, which for low % classes is smaller than the required number to mimic the foreground 100%
|
2554: nPeaksCur = GC_classes_all.df$n.bg.needed[i]
|
2556: nPeaksCur = min(GC_classes_all.df$n.bg.needed[i], nrow(peaksBackgroundGCCur))
|
2559: if (GC_classes_all.df$n.bg.needed[i] > nrow(peaksBackgroundGCCur)) {
|
2574: plots_GC.l[[TFCur]] = .generateTF_GC_diagnosticPlots(TFCur, GC_classes_foreground.df, GC_classes_background.df, GC_classes_all.df, peaksForeground, peaksBackground, peaksBackgroundGC)
|
2760: .findMaxBackgroundSize <- function (GC_classes_foreground.df, GC_classes_background.df, peaksBackground, threshold_percentage = 0.05) {
|
2777: for (i in seq_len(nrow(GC_classes_foreground.df))) {
|
2779: n_rel = GC_classes_foreground.df$n_rel[i]
|
2784: availableNoPeaks = GC_classes_background.df %>%
|
2796: if (i == nrow(GC_classes_foreground.df)) {
|
2802: } # end of for (i in 1:nrow(GC_classes_foreground.df)) {
|
2857: checkmate::assertClass(GRN, "GRN")
|
3481: checkmate::assertClass(GRN, "GRN")
|
4079: checkmate::assertClass(GRN, "GRN")
|
4362: checkmate::assertClass(GRN, "GRN")
|
4716: #' @param asMatrix Logical. \code{TRUE} or \code{FALSE}. Default \code{FALSE}. If set to \code{FALSE}, counts are retu...(167 bytes skipped)...
|
4717: ...(10 bytes skipped)...includeIDColumn Logical. \code{TRUE} or \code{FALSE}. Default \code{TRUE}. Only relevant if \code{asMatrix = FALSE}. If set to \code{TRUE}, an explicit ID column is returned (no row names). If set to \code{...(45 bytes skipped)...
|
4727: getCounts <- function(GRN, type, permuted = FALSE, asMatrix = FALSE, includeIDColumn = TRUE, includeFiltered = FALSE) {
|
4729: checkmate::assertClass(GRN, "GRN")
|
4746: if ("matrix" %in% classPeaks) {
|
4748: } else if ("dgCMatrix" %in% classPeaks) {
|
4759: if ("matrix" %in% classRNA) {
|
4761: } else if ("dgCMatrix" %in% classRNA) {
|
4793: if (!asMatrix) {
|
4832: ...(2 bytes skipped)... data frame that is returned has different columns, which however can be divided into the following classes according to their name:
|
4887: checkmate::assertClass(GRN, "GRN")
|
5048: checkmate::assertClass(GRN, "GRN")
|
5084: #' Optional convenience function to delete intermediate data from the function \code{\link{AR_classification_wrapper}} and summary statistics that may occupy a lot of space
|
5094: checkmate::assertClass(GRN, "GRN")
|
5102: GRN@data$TFs$classification[[permIndex]]$TF_cor_median_foreground = NULL
|
5103: GRN@data$TFs$classification[[permIndex]]$TF_cor_median_background = NULL
|
5104: GRN@data$TFs$classification[[permIndex]]$TF_peak_cor_foreground = NULL
|
5105: GRN@data$TFs$classification[[permIndex]]$TF_peak_cor_background = NULL
|
5106: GRN@data$TFs$classification[[permIndex]]$act.rep.thres.l = NULL
|
5129: checkmate::assertClass(GRN, "GRN")
|
5215: GRN@data$peaks[["counts"]] = .storeAsMatrixOrSparseMatrix(GRN, df = GRN@data$peaks$counts_norm %>% dplyr::select(-"isFiltered"),
|
5243: GRN@data$RNA[["counts"]] = .storeAsMatrixOrSparseMatrix(GRN, df = GRN@data$RNA$counts_norm.l[["0"]] %>% dplyr::select(-"isFiltered"),
|
5437: # Some classes might be missing, add them here with explicit zeros
|
5494: dplyr::mutate(classAll = factor(.data$classAll, levels=c(paste0("real_",range), paste0("random_",range), "TRUE", "FALSE")),
|
5539: checkmate::assertClass(GRN, "GRN")
|
5550: expMeans.m = getCounts(GRN, type = "rna", permuted = FALSE, asMatrix = TRUE)
|
5561: ...(5 bytes skipped)... mean = rowMeans(getCounts(GRN, type = "peaks", permuted = FALSE, asMatrix = TRUE))) %>%
|
5614: checkmate::assertClass(GRN, "GRN")
|
88: par.l$internal$allClassificationThresholds = c(0.1, 0.05, 0.01, 0.001)
|
1784: peak_TF_overlapCur.df = .asMatrixFromSparse(GRN@data$TFs$TF_peak_overlap, convertZero_to_NA = FALSE) %>%
|
2143: .finalizeClassificationAndAppend(
|
4749: result = .asMatrixFromSparse(GRN@data$peaks$counts, convertZero_to_NA = FALSE)
|
4762: result = .asMatrixFromSparse(GRN@data$RNA$counts, convertZero_to_NA = FALSE)
|
scone:R/sconeReport.R: [ ] |
---|
837: Class = factor(strat_col())
|
113: # Matrix nodes in scone_res
|
310: "Row Class",
|
319: label = "Column Class",
|
840: ggplot(data.frame(Class,Val ),aes(x = Class,y = Val)) +
|
841: geom_violin(scale = "width", trim = TRUE, aes(fill = Class))+
|
888: Class = factor(strat_col())
|
891: ggplot(data.frame(Class,Val ),aes(x = Class,y = Val)) +
|
892: geom_violin(scale = "width", trim = TRUE, aes(fill = Class))+
|
944: colnames(datt) = c("Class-Bio","Class-Batch","Class-Pam")
|
101: ## ----- If NULL classifications, Replace with NA ------
|
745: text(0,labels = "Stratify plots by a multi-level classification.")
|
792: text(0,labels = "Stratify plots by a multi-level classification.")
|
820: text(0,labels = "Stratify plots by a multi-level classification.")
|
928: text(0,labels = "Stratify plots by a multi-level classification.")
|
ISAnalytics:R/internal-functions.R: [ ] |
---|
98: rlang::warn(warn, class = "missing_crit_tags")
|
218: ), class = "missing_req_col_err")
|
249: ), class = "missing_req_col_err")
|
437: rlang::inform(warn_empty_iss, class = "warn_empty_iss")
|
546: class = "warn_empty_iss"
|
608: rlang::abort(error_msg(tags_names), class = "missing_tags_err")
|
717: rlang::abort(single_err, class = "tag_dupl_err")
|
782: rlang::abort(compact_msg, class = "tag_type_err")
|
1135: rlang::abort(add_types_err, class = "add_types_err")
|
1307: class = "xls_file"
|
1483: class = "na_concat"
|
1583: class = "filter_warn"
|
1956: class = "missing_path_col"
|
2926: rlang::inform(missing_msg, class = "auto_mode_miss")
|
3186: class = "coll_matrix_issues"
|
3251: rlang::abort(not_date_err, class = "not_date_coll_err")
|
4246: rlang::inform(warn, class = "rec_unsupp_ext")
|
4752: rlang::abort(err_msg, class = "genomic_file_char")
|
4842: rlang::warn(warn_miss, class = "warn_miss_genes")
|
5203: class = "missing_cols_key"
|
5253: rlang::inform(flag_msg, class = "flag_logic_long")
|
5571: rlang::abort(format_err, class = "outlier_format_err")
|
5171: KnownGeneClass = ifelse(
|
1015: colClasses = col_types,
|
612: rlang::abort(error_msg(missing_tags), class = "missing_tags_err")
|
735: rlang::inform(single_warn, class = "tag_dupl_warn")
|
758: err <- c(paste("Wrong col class for tag '", sub_df$tag[1], "'"),
|
906: # @param x A data.frame object (or any extending class)
|
925: # @param x A data.frame object (or any extending class)
|
977: #---- USED IN : import_single_Vispa2Matrix ----
|
1132: "?import_single_Vispa2Matrix"
|
1149: class = "unsup_comp_format"
|
1164: class = "im_single_miss_mand_vars"
|
1266: class = "ism_import_summary"
|
2949: rlang::inform(dupl_msg, class = "auto_mode_dupl")
|
5222: class = "missing_cols_pool"
|
5276: class = "flag_logic_short"
|
5294: rlang::abort(unknown_logi_op_err, class = "unsupp_logi_op")
|
5574: rlang::abort(format_err, class = "outlier_format_err")
|
779: "Wrong column classes for some tags",
|
1048: col_types <- .mandatory_IS_types("classic")
|
1052: .annotation_IS_types("classic")
|
1144: ### If not, switch to classic for reading
|
1145: mode <- "classic"
|
geNetClassifier:R/functions.public.R: [ ] |
---|
389: class <- names(x)[largest]
|
71: classes <- factor(apply(prob, 2, function(x) {assignment.conditions(x, minProb, minDiff)}))
|
97: classes<-unique(c(rownames(mxcf),colnames(mxcf)))
|
133: byClass <- matrix(nrow=nclasses, ncol=4)
|
176: externalValidation.probMatrix<- function(queryResult, realLabels, numDecimals=2)
|
209: probMatrix <- matrix(0,nrow=length(levels(realLabels)), ncol=length(predClasses))
|
215: classAssignments <- globalQueryResult$class[names(realLabels)[which(realLabels==label)]] #Prob for the class samples, even if the prediction was wrong
|
249: classes <- rownames(globalQueryResult$probabilities)
|
289: highestProbClass...(9 bytes skipped)...mes(globalQueryResult$probabilities)[apply(globalQueryResult$probabilities[,which(globalQueryResult$class == "NotAssigned"), drop=FALSE], 2, function(x) which(order(x, decreasing=TRUE)==1))] #Clase con la ...(18 bytes skipped)...
|
293: nextClass...(17 bytes skipped)...mes(globalQueryResult$probabilities)[apply(globalQueryResult$probabilities[,which(globalQueryResult$class == "NotAssigned"), drop=FALSE], 2, function(x) which(order(x, decreasing=TRUE)==2))]
|
608: exprMatrix <- eset
|
695: classes <- levels(sampleLabels)
|
718: classLabels <- stats::setNames(paste("C", sapply(classes,function(x) which(classes==x)), sep=""), classes)
|
795: if(!is.null(colnames(genes))) { geneClass <- unique(colnames(genes)[which(genes == genesVector[i],arr.ind=TRUE)[,2]])
|
815: classMean <- mean(matriz[genesVector[i], (prevLim+1):j])
|
931: classificationGenesRanking <- classificationGenes
|
1084: geneClass<-NULL
|
1156: tempDpMatrix <- discrPwDF
|
1307: classificationGenesInfo <- genesDetails(classificationGenes)[nwClasses]
|
1382: classGeneLabels <- as.vector(genesInfoList[[cl]][,"GeneName"])[availableNames]
|
1395: classGenes <- getNodes(genesNetwork[[cl]])
|
1412: classificationGenesNetwork <- NULL
|
1413: classificationGenesID <- NULL
|
1489: if(length(genesNetwork[[nw]]@nodes)>0) { classGraph <- igraph::graph.data.frame(as.data.frame(genesNetwork[[nw]]@edges[,ntwColnames,drop=FALSE]), ...(68 bytes skipped)...
|
31: queryGeNetClassifier <- function(classifier, eset, minProbAssignCoeff=1, minDiffAssignCoeff=0.8, verbose=TRUE)
|
42: numClasses <- length(classifier$levels)
|
99: nclasses <- length(classes)
|
105: missingClasses <- classes[which(!classes %in% colnames(mxcf))]
|
207: predClasses <- c(levels(realLabels), rownames(globalQueryResult$probabilities)[which(!rownames(globalQueryRes...(46 bytes skipped)...
|
250: numClasses <- length(classes)
|
337: if(is.null(totalNumberOfClasses)) {numClasses <- length(levels(realLabels))
|
509: numClasses <- length(gClasses(genesRanking))
|
697: numClasses <- length(classes)
|
991: longClassNames <- any(nchar(classNames)>6)
|
1000: numClasses <- ifelse(is.matrix(classificationGenes), length(classNames), length(classifier$levels))
|
1269: nwClasses <- names(genesNetwork)
|
1473: numClasses<-length(genesNetwork)
|
43: ...(52 bytes skipped)...obAssignCoeff' should be a coefficient to modify the probability required to assign the sample to a class.")
|
44: ...(72 bytes skipped)...d be a coefficient to modify the required difference between probabilites to assign the sample to a class.")
|
67: ...(86 bytes skipped)...etSelection)) esetSelection <- t(cbind(NULL,esetSelection)) #To avoid error when there is only 1gen/class
|
72: ret <- list(call=match.call(), class= classes, probabilities=prob)
|
77: ...(6 bytes skipped)...ulates stats from the confussion matrix. i.e. sensitivity and specificity of the predictor for each class, global accuracy and call rate (rate of assigned samples)
|
79: # 100% Sensitivity = Recognizes all positives for the class
|
80: # 100% Specificity = Recognizes all negatives for the class
|
82: #Renombrado de class.accuracy
|
93: warning("The confussion matrix should have the real class in rows and the assigned class in cols. The matrix provided didn't seem to be in the right order so it was transposed:")
|
174: # Returns the matrix with the average probabilities of assigning a sample to each class (only of assigned samples)
|
186: if (length(realLabels) == length( names(queryResult$class)))
|
188: names(realLabels) <- names(queryResult$class)
|
201: if(sum(!names(globalQueryResult$class) %in% names(realLabels)) >0) stop("There are samples for which the real label was not provided.")
|
203: if((length(globalQueryResult$class)!=dim(globalQueryResult$probabilities)[2]) || (sum(!names(globalQueryResult$class) %in% colnames(globalQueryResult$probabilities))>0 )) {stop("The samples in $class and in $probabilities do not match.")}
|
228: # Gives basic stats of the probabilities with wich the samples were assigned to the class
|
246: if(length(globalQueryResult$class)!=dim(globalQueryResult$probabilities)[2]) {}#El numero de samples no encaja
|
248: numSamples <- length(globalQueryResult$class)
|
262: if (globalQueryResult$class[i] == classes[c])
|
270: else if (c==1 && (globalQueryResult$class[i] == "NotAssigned")) notAssigned <- notAssigned+1
|
284: # Info about NotAssigned samples (most likely class & probs)
|
288: highestProb <- apply(globalQueryResult$probabilities[,which(globalQueryResult$class == "NotAssigned"), drop=FALSE], 2, function(x) round(max(x), numDecimals)) #--> mayor probabilid...(13 bytes skipped)...
|
291: nextProbIndex <- cbind(apply(globalQueryResult$probabilities[,which(globalQueryResult$class...(10 bytes skipped)...signed"), drop=FALSE], 2, function(x) which(order(x, decreasing=TRUE)==2)), which(globalQueryResult$class == "NotAssigned"))
|
302: ...(19 bytes skipped)...("The query contains ", samplesQueried=numSamples, " samples. ",sum(stats[,1])," were assigned to a class resulting on a call rate of ", callRate,"%. \n", sep=""))
|
331: if (length(realLabels) == length(names(queryResult$class)))
|
333: names(realLabels) <- names(queryResult$class)
|
342: ...(72 bytes skipped)...d be a coefficient to modify the required difference between probabilites to assign the sample to a class.")
|
363: plot(c(minX,1), c(0,1), type="n", xlab="Probability of the most likely class", ylab="Difference with next class", frame=FALSE, main="Thresholds to assign query samples")
|
380: ...(0 bytes skipped)... graphics::legend("bottomright", "(x,y)", legend=c("Correct", "Incorrect"), title = "Most likely class", text.width = strwidth("1,000,000"), xjust = 1, yjust = 1, lty = 0, pch=16, col=c(correctColor, i...(24 bytes skipped)...
|
393: class <- "NA"
|
395: return(c(biggestProb=x[largest], nextProb=nextProb, assignedClass=class))
|
466: if(class(sampleLabels) != "factor") {
|
480: if(class(sampleLabels) != "factor") { warning("The argument 'sampleLabels' had to be converted into a factor...(27 bytes skipped)...
|
599: if(class(sampleLabels) != "factor") { warning("The argument 'sampleLabels' had to be converted into a factor...(27 bytes skipped)...
|
638: if(class(sampleLabels) != "factor") { warning("The argument 'sampleLabels' had to be converted into a factor...(4 bytes skipped)...
|
671: # Default class colors for boxplot
|
719: warning(paste("Some class names are longer than 10 characters. The following labels will be used in plots:\n",paste(classLabels, names(classLabels), sep=": ", collapse="\n"), sep=""))
|
746: geneTitles <- matrix(ncol=3, dimnames=list(genesVector,c("class","label","labelShort")),nrow=length(genesVector))
|
749: # Class
|
752: # Gene class, from genes table
|
753: geneTitles[g,"class"] <- unique(colnames(genes)[which(genes == g,arr.ind=TRUE)[,2]])
|
754: if(nchar(geneTitles[g,"class"])>10) geneTitles[g,"class"] <- paste(geneTitles[g,"class"], " (C",which(classes==geneTitles[g,"class"]), ")", sep="")
|
757: geneTitles[g,"class"]<-""
|
799: title(paste(geneTitles[genesVector[i],"class"], geneTitles[genesVector[i],"label"], sep="\n" ))
|
811: if (any(nchar(classes)>10) ) {graphics::text(prevLim+((j-prevLim)/2), ylim[2]-(ylim[2]*0.04), labels=classLabels[sampleLabels[j]]) # Class title
|
812: ...(52 bytes skipped)...evLim+((j-prevLim)/2)+0.5, y=ylim[2]-(ylim[2]*0.04), labels=paste(sampleLabels[j],sep=""), pos=3) # Class title
|
845: title(paste(geneTitles[gen,"class"], geneTitles[gen,"label"], sep="\n" ))
|
926: if(any(class(classificationGenes) == "GenesRanking"))
|
988: warning(paste("The number of classes provided don't match the classifier's. The default class names will be used instead.",sep=""), immediate. = TRUE) }
|
1002: if(!is.matrix(classificationGenes)) { #if(verbose) warning("The 'classification genes' are not sorted by colums and classes, the gene class will not be shown .")
|
1010: classificationGenes <- classificationGenes[,apply(classificationGenes, 2, function(x) !all(is.na(x)))] # Is there any class without genes?
|
1259: warning(paste("Plotting up to ", max(numGenes(genesRanking)), " genes of each class.", sep=""))
|
1272: if(!class(genesNetwork) == "GenesNetwork") stop("genesNetwork should be either a list or a GenesNetwork.")
|
1273: if((sum(c("class1", "class2") %in% colnames(genesNetwork@edges)) == 2 ) && nrow(genesNetwork@edges)>0)
|
1275: nwClasses <- unique(as.vector(genesNetwork@edges[,c("class1", "class2")]))
|
1291: if(any(class(classificationGenes) == "GenesRanking") && all(numGenes(classificationGenes) == 0)) classificationGenes <- NULL
|
1298: if(class(genesRanking) != "GenesRanking") stop("genesRanking should be an object of type GenesRanking.")
|
1305: if(class(classificationGenes)[1] != "GenesRanking") stop("classificationGenes should be an object of type GenesRanking (the classificationGenes object returned by the classifier).")
|
1345: if(any(! names(genesNetwork) %in% names(genesInfo))) { stop("The class names in genesInfo and genesNetwork do not match.")
|
1481: # For each class...
|
4: # clasificador (in file: classifier.main.r)
|
7: # externalValidation.probMatrix
|
24: # classifier:
|
30: # WARNING!: The arrays should have been normalized with the samples used for the classifier training.
|
36: if(is(classifier, "GeNetClassifierReturn")){
|
37: if("classifier" %in% names(classifier)) { classifier <- classifier@classifier$SVMclassifier
|
38: }else stop("'classifier' doesn't contain a trained classifier.")
|
40: if(!is(classifier, "svm")) classifier <- classifier$SVMclassifier
|
41: if(!is(classifier, "svm")) stop("The first argument should be the classifier returned by geNetClassifier.")
|
45: if(minProbAssignCoeff<0 || ((numClasses != 2) &&(minProbAssignCoeff>(numClasses/2)))) stop("'minProbAssignCoeff' should be between 0 and half of the number of classes.")
|
46: if(minDiffAssignCoeff<0 || minDiffAssignCoeff>numClasses) stop("'minDiffAssignCoeff' should be between 0 and the number of classes.")
|
47: genes <- colnames(classifier$SV)
|
59: rand <- 1/length(classifier$levels)
|
60: if(length(classifier$levels)>2) { minProb <- 2*rand * minProbAssignCoeff
|
63: ...(147 bytes skipped)..., "(default)",""),".\n Minimum difference between the probabilities of first and second most likely classes = ", round(minDiff,2),ifelse(minDiffAssignCoeff==1, "(default)",""), sep="")) ; utils::flush.co...(8 bytes skipped)...
|
68: prob <- t(attributes(stats::predict(classifier, esetSelection, probability=TRUE ))$probabilities)
|
69: if(is.null(names(prob))) colnames(prob)<-rownames(esetTdf) # if 2 classes... not labeled. Needed for mxcf...
|
83: externalValidation.stats <- function(confussionMatrix, numDecimals=2) #Confussion matrix
|
85: mxcf <- confussionMatrix
|
98: if(any(classes=="NotAssigned")) classes <- classes[-which(classes=="NotAssigned")]
|
103: if (any(!classes %in% colnames(mxcf)))
|
111: if (any(!classes %in% rownames(mxcf)))
|
113: missingClasses <- classes[which(!classes %in% rownames(mxcf))]
|
120: #Just in case they are not in order (Diagonal=hits). Will use only the real classes.
|
121: mxcf<- mxcf[,c(classes,"NotAssigned")] ...(22 bytes skipped)...
|
122: mxcf<- mxcf[c(classes),]
|
134: rownames(byClass)<- classes
|
135: colnames(byClass)<-c("Sensitivity","Specificity", "MCC", "CallRate")
|
159: byClass[i,1] <- round(100*(truePositives[i]/(truePositives[i]+falseNegatives[i])) ,numDecimals)
|
161: byClass[i,2] <- round(100*(trueNegatives[i]/(trueNegatives[i]+falsePositives[i])) ,numDecimals)
|
163: byClass[i,3] <- round(100*( ((truePositives[i]*trueNegatives[i])-(falsePositives[i]*falseNegatives[i])) / ...(175 bytes skipped)...
|
165: if(i <= dim(mxcf)[1]) byClass[i,4] <- round(100*( (sum(mxcf[i,])- mxcf[i,dim(mxcf)[2]])/sum(mxcf[i,])) ,numDecimals)
|
171: return( list(byClass=byClass, global=global, confMatrix=mxcf) )
|
210: rownames(probMatrix)<- levels(realLabels)
|
211: colnames(probMatrix)<- predClasses
|
216: assignedSamples <- names(classAssignments)[ which( classAssignments!= "NotAssigned")]
|
219: if(length(assignedSamples)>1) probMatrix...(8 bytes skipped)... <- apply(globalQueryResult$probabilities[,assignedSamples], 1, function(x) {mean(x)})[colnames(probMatrix)]
|
220: else probMatrix[label,] <- globalQueryResult$probabilities[,assignedSamples][colnames(probMatrix)]
|
224: ret<- round(probMatrix,numDecimals)
|
253: rownames(stats)<-c(classes)
|
295: notAssignedSamples <- cbind(highestProbClass=highestProbClass, as.data.frame(highestProb), nextProb=nextProb, nextClass=nextClass)
|
339: if(!is.numeric(totalNumberOfClasses) || (totalNumberOfClasses<length(levels(realLabels)))) stop ("totalNumberOfClasses should be the number of classes for which the classifier was originaly trained.")
|
343: if(minProbAssignCoeff<0 || ((numClasses != 2) &&(minProbAssignCoeff>(numClasses/2)))) stop("'minProbAssignCoeff' should be between 0 and half of the number of classes.")
|
344: if(minDiffAssignCoeff<0 || minDiffAssignCoeff>numClasses) stop("'minDiffAssignCoeff' should be between 0 and the number of classes.")
|
397: rownames(prob) <- c("biggestProb", "nextProb", "assignedClass")
|
400: correct <- which(prob["assignedClass",] == prob["realLabels",])
|
401: incorrect <- which(prob["assignedClass",] != prob["realLabels",])
|
467: #warning("The argument 'classification sampleLabels' had to be converted into a factor.", immediate. = TRUE)
|
533: numClasses <- ncol(postProb) # If there are only 2 classes, postProb only has 1 column
|
575: ...(55 bytes skipped)...leName=NULL, geneLabels=NULL, type="lines", sampleLabels=NULL, sampleColors=NULL, labelsOrder=NULL, classColors=NULL, sameScale=TRUE, showSampleNames=FALSE, showMean= FALSE, identify=TRUE, verbose=TRUE)
|
610: if(is(exprMatrix, "ExpressionSet")) exprMatrix <- exprs(exprMatrix) else if (!is.matrix(exprMatrix)) stop("The first argument should be an expression matrix or an ExpressionSet.")
|
615: genes <- rownames(exprMatrix)
|
618: if(is(genes, "GeNetClassifierReturn") && "classificationGenes" %in% names(genes)) {
|
619: genes <- genes@classificationGenes
|
620: warning("Plotting expression profiles of the classification genes. To plot other genes, set i.e. genes=...@genesRanking")
|
629: if(sum(!genes[which(genes!="NA")] %in% rownames(exprMatrix))!=0) stop ("The expression matrix doesn't contain all the genes.")
|
632: if(!is.null(geneLabels)) geneLabels<-extractGeneLabels(geneLabels, rownames(exprMatrix[genesVector,]))
|
635: numSamples <- dim(exprMatrix)[2]
|
643: if(sum(!names(sampleLabels) %in% colnames(exprMatrix))>0 ) stop("The names of the labels do not match the samples.")
|
646: names(sampleLabels)<-colnames(exprMatrix)
|
659: if(!is.null(sampleColors) && !is.null(classColors)) stop("Provide either 'sampleColors' or 'classColors'")
|
662: if(is.null(classColors))
|
672: if(is.null(classColors))
|
674: if(!is.null(sampleLabels)) classColors <- rev(hcl(h=seq(0,360, length.out=length(levels(sampleLabels))+1))[1:length(levels(sampleLab...(7 bytes skipped)...
|
675: if(is.null(sampleLabels)) classColors <- "white"
|
680: if(is.null(sampleLabels)) stop("Cannot use 'classColors' if 'sampleLabels' is not provided.")
|
681: if(length(levels(sampleLabels)) != length(classColors))stop("Length of 'classColors' should match the number of classes in the samples.")
|
683: if(any(type%in%"lines")) sampleColors <- classColors[sampleLabels]
|
696: if(!is.null(labelsOrder)) classes <- labelsOrder
|
702: indexes <- c(indexes, which(sampleLabels==classes[i]))
|
704: matriz <- exprMatrix[genesVector, indexes, drop=FALSE]
|
709: classes <- colnames(genes)
|
710: numClasses <- length(classes)
|
711: matriz <- exprMatrix[genesVector,, drop=FALSE]
|
716: if(any(nchar(classes)>10))
|
796: } else { geneClass<-"" } #classes[which(genes == genesVector[i], arr.ind=TRUE)[2]]
|
810: ...(21 bytes skipped)... if(!is.na((sampleLabels[j] != sampleLabels[j+1]) ) ) abline(v=j+0.5, col="black") # Separate classes
|
816: graphics::lines(c(prevLim+1, j), c(classMean, classMean) , col="grey")
|
834: names(esetXclases) <- classLabels[names(esetXclases)] #paste("C", sapply(names(esetXclases),function(x) which(classes==x)), sep="")
|
844: ...(12 bytes skipped)... boxplot(Expression~sampleLabel, esetExprSamplesMelted, ylim=ylim, ylab="Expression values", col=classColors, las=2, outpch=16, outcex=0.5)
|
879: # discriminant.power.plot(classifier, classificationGenes, classNames=c("ALL","AML","CLL","CML","NoLeu"), fileName="test.pdf",correctedAlpha=TRUE)
|
880: # discriminant.power.plot(classifier, classificationGenes, fileName="test.pdf")
|
881: # Classification genes: Genes por columnas (nombrecolumna= clase)
|
882: # discriminant.power.plot(classifier, colnames(classif$SV), fileName="test.pdf")
|
888: # classifier: puede ser un svm o el objeto devuelto por la funcion principal
|
889: # classificationGenes: puede ser un c(), una matriz o un GenesRanking
|
891: plotDiscriminantPower <- function(classifier, classificationGenes=NULL , geneLabels=NULL, classNames=NULL, plotDP = TRUE, fileName= NULL, returnTable=FALSE, verbose=TRUE)
|
904: # Classifier
|
905: if(is(classifier, "GeNetClassifierReturn")){
|
906: if("classificationGenes" %in% names(classifier))
|
908: if(is.null(classificationGenes))
|
910: classificationGenes <- classifier@classificationGenes
|
912: if(is.null(geneLabels) && is.character(classificationGenes))
|
914: if(length(classifier@classificationGenes@geneLabels) > 0 && any(!is.na(classifier@classificationGenes@geneLabels[classificationGenes])))
|
915: geneLabels <- classifier@classificationGenes@geneLabels[classificationGenes]
|
919: if("classifier" %in% names(classifier)) {classifier <- classifier@classifier$SVMclassifier
|
920: }else stop("'classifier' doesn't contain a trained classifier.")
|
922: if(is.list(classifier) && ("SVMclassifier" %in% names(classifier))) classifier <- classifier$SVMclassifier
|
923: if(!is(classifier,"svm")) stop("The first argument should be a svm classifier or the object returned by geNetClassifier.")
|
925: # ClassificationGenes (GenesRanking)
|
928: if(sum(numGenes(classificationGenes)))
|
930: if(is.null(geneLabels) && (length(classificationGenes@geneLabels) > 0 && any(!is.na(classificationGenes@geneLabels)))) geneLabels <- classificationGenes@geneLabels
|
932: classificationGenes <- getRanking(classificationGenes, showGeneLabels=FALSE, showGeneID=TRUE)$geneID
|
934: classificationGenes <- NULL
|
935: classificationGenesRanking<-NULL
|
938: classificationGenesRanking<-NULL
|
941: # If classificationGenes is not provided/valid, use the classifier's SV
|
942: missingGenes <- !as.vector(classificationGenes[!is.na(classificationGenes)]) %in% colnames(classifier$SV)
|
945: missingGenes <- as.vector(classificationGenes[!is.na(classificationGenes)])[which(missingGenes)]
|
951: missingGenes <- missingGenes[which(!missingGenes %in% colnames(classifier$SV))]
|
953: classificationGenes[which(classificationGenes %in% missingGenes)] <- NA
|
955: if(all(is.na(classificationGenes))) stop("The given 'classificationGenes' are not used by the classifier. Their Discriminant Power cannot be calculated.")
|
956: if(length(missingGenes)>0) warning(paste("The following classificationGenes are not used by the classifier. Their Discriminant Power cannot be calculated: ", missingGenes, sep=""))
|
958: if(is.null(classificationGenes)) classificationGenes <- colnames(classifier$SV)
|
981: ...(35 bytes skipped)...ull(names(geneLabels))) stop("names(geneLabels) can't be empty. It should contain the names used in classification genes.")
|
982: #if(!is.null(geneLabels) && sum(!names(geneLabels) %in% classificationGenes[which(classificationGenes!="NA")] )>0) warning("Some geneLabels will not be used.")
|
983: if(!is.null(geneLabels) && sum(!classificationGenes[which(class...(9 bytes skipped)...Genes!="NA")] %in% names(geneLabels))>0) warning("geneLabels doesn't contain the symbol for all the classification genes.")
|
985: # classNames
|
986: if(is.null(classNames) || (length(classifier$levels) != length(classNames))){
|
987: if (!is.null(classNames) && length(classifier$levels) != length(classNames)) {
|
989: classNames <-classifier$levels
|
994: for( i in 1:length(classNames)) #Add "C1:..."
|
996: if (nchar(classNames[i])>10 ) classNames[i] <- paste(substr(classNames[i] ,1,10), "...",sep="")
|
997: classNames[i] <- paste("C", i, ": ", classNames[i], sep="")
|
1005: if(length(classifier$levels) == 2) {
|
1006: if (dim(classificationGenes)[2] != 1) stop("The classes of the classifier and the classification genes provided don't match.")
|
1008: if(sum(!colnames(classificationGenes) %in% classifier$levels)>0) stop("The classes of the classifier provided and the classification genes don't match.")
|
1013: nGenes <- length(classificationGenes[which(!is.na(classificationGenes))]) #sum(numGenes(classifier$classificationGenes))
|
1014: if(nGenes>dim(classifier$SV)[2]){ warning(paste("The given number of genes is bigger than the classifier's.",sep=""), immediate. = TRUE)}
|
1021: if(is.matrix(classificationGenes)) # If it contains the genes by classes (columns)
|
1023: for(cl in 1:dim(classificationGenes)[2])
|
1025: discrPwList <- c(discrPwList, discrPwList=list(sapply(as.character(classificationGenes[which(classificationGenes[,cl]!="NA"),cl]), function(x) SV.dif(classifier, x, correctedAlpha=correctedAlpha))))
|
1026: names(discrPwList)[cl] <- colnames(classificationGenes)[cl]
|
1030: classificationGenes <- classificationGenes[which(!is.na(classificationGenes))]
|
1031: discrPwList <- list(sapply(as.character(classificationGenes), function(x) SV.dif(classifier, x, correctedAlpha=correctedAlpha)))
|
1032: classificationGenes <- as.matrix(classificationGenes)
|
1042: numRows <- numGenesPlot/dim(classificationGenes)[2]
|
1043: while ((numRows < dim(classificationGenes)[1]) && (length(classificationGenes[which(!is.na(classificationGenes[1:numRows,, drop=FALSE]))]) < numGenesPlot))
|
1048: if(length(classificationGenes[which(!is.na(classificationGenes[1:numRows,, drop=FALSE]))]) <= numGenesPlot)
|
1050: classificationGenes <- classificationGenes[1:numRows,, drop=FALSE]
|
1052: classificationGenes <- classificationGenes[1:(numRows-1),, drop=FALSE]
|
1068: mycols <- colorRampPalette(c("blue","white"))(max(classifier$nSV+2))
|
1070: for(c in 1:dim(classificationGenes)[2]) #numClasses
|
1072: for(g in 1:dim(classificationGenes)[1])
|
1075: gene <- classificationGenes[g,c]
|
1087: geneClass <- names(gene)
|
1088: if(nchar(geneClass)>70) geneClass<- substr(geneClass,1,70)
|
1101: tit<- paste(geneClass,"\n", geneName, "\n", sep="")
|
1104: ...(31 bytes skipped)...(tit, abs(round(discrPwList[[c]][,gene]$discriminantPower,2)), " (", discrPwList[[c]][,gene]$discrPwClass, ")", sep="")
|
1125: ...(0 bytes skipped)... barplot(pos,add=TRUE, col=mycols, width=0.9, space=0.1, names.arg=rep("",length(classNames)))
|
1126: ...(0 bytes skipped)... barplot(neg,add=TRUE, col=mycols, width=0.9, space=0.1, names.arg=rep("",length(classNames)))
|
1128: if(!correctedAlpha) graphics::text(seq(1, length(classNames), by=1)-0.5, par("usr")[3] - 0.2, labels = classNames, srt = 90, pos = 4, xpd = TRUE)
|
1129: if(correctedAlpha) graphics::text(seq(1, length(classNames), by=1)-0.5, par("usr")[3], labels = classNames, srt = 90, pos = 4, xpd = TRUE)
|
1148: discrPwDF<- rbind(discrPwDF, cbind(t(discrPwList[[cl]][c("discriminantPower","discrPwClass"),]), originalClass=rep(names(discrPwList)[cl],dim(discrPwList[[cl]])[2])))
|
1153: discrPwDF[,"discrPwClass"] <- as.character(discrPwDF[,"discrPwClass"])
|
1157: tempDpMatrix[,"discriminantPower"] <- abs (tempDpMatrix[,"discriminantPower"] )
|
1159: for(cl in classifier$levels)
|
1161: clGenes <- which(tempDpMatrix[,"discrPwClass"]==cl)
|
1162: discrPwDF <- rbind(discrPwDF, tempDpMatrix[clGenes[order(as.numeric(tempDpMatrix[clGenes,"discriminantPower"]),decreasing=TRUE)],])
|
1166: if(is.null(classificationGenesRanking))
|
1171: gDetails<-genesDetails(classificationGenesRanking)
|
1177: genesDetailsDF <- cbind(discrPwClass=rep(NA,dim(discrPwDF)[1]), discriminantPower=rep(NA,dim(discrPwDF)[1]), genesDetailsDF[rownames(dis...(39 bytes skipped)...
|
1178: genesDetailsDF[,"discrPwClass"] <- as.character(discrPwDF[,"discrPwClass"])
|
1187: # plotType="dynamic" (each can be modified), plotType="static" (1 image divided into classes), plotType="pdf"
|
1189: # genesInfo: Data.frame containing info about the genes. Can be replaced by classificationGenes or genesRanking (recommended).
|
1190: # If classificationGenes + genesRanking:
|
1191: # classificationGenes: Tiene q ser un genesRanking
|
1193: plotNetwork <- function(genesNetwork, class...(96 bytes skipped)...tType="dynamic", fileName=NULL, plotAllNodesNetwork=TRUE, plotOnlyConnectedNodesNetwork=FALSE, plotClassifcationGenesNetwork=FALSE, labelSize=0.5, vertexSize=NULL, width=NULL, height=NULL, verbose=TRUE)
|
1254: if(is.null(classificationGenes) && ("classificationGenes" %in% names(genesNetwork))) classificationGenes <- genesNetwork@classificationGenes
|
1257: nGenes <- max( 100, numGenes(genesNetwork@classificationGenes))
|
1277: }else nwClasses <- "geneClass"
|
1289: # Check classificationGenes and Genes ranking format and EXTRACT its genes INFO.
|
1290: if(is.matrix(classificationGenes) && nrow(classificationGenes)==0) classificationGenes <- NULL
|
1292: if(plotClassifcationGenesNetwork && is.null(classificationGenes)) warning("The classifcation genes network can only be plotted if the classification genes are provided.")
|
1293: if((!is.null(class...(30 bytes skipped)...nesRanking)) && !is.null(genesInfo)) stop("Please, provide either 'genesInfo' OR a genesRanking and classificationGenes.")
|
1294: if(!is.null(genesRanking) || !is.null(classificationGenes))
|
1303: if(!is.null(classificationGenes))
|
1308: clGenes <- lapply(classificationGenesInfo, rownames)
|
1310: if(showWarning) warning("Not all the classificationGenes are available in the genesNetwork. They will be represented, but there may be missing...(29 bytes skipped)...
|
1314: genesInfo <- classificationGenesInfo
|
1317: missingColumnsInGlobal <- colnames(classificationGenesInfo[[1]])[which(!colnames(classificationGenesInfo[[1]]) %in% colnames(genesInfo[[1]]))]
|
1328: ...(30 bytes skipped)... if((is.factor(temp[,tempCol]))) levels(temp[,tempCol]) <- unique(c(levels(temp[,tempCol]), levels(classificationGenesInfo[[cl]][,tempCol])))
|
1331: temp[rownames(classificationGenesInfo[[cl]]), ] <- classificationGenesInfo[[cl]][,colnames(temp)]
|
1364: ...(143 bytes skipped)...lot, but there may be missing relationships.") # showWarning: The warning was already shown for the classification genes.
|
1383: names(classGeneLabels) <- rownames(genesInfoList[[cl]])[availableNames]
|
1384: geneLabels <- c(geneLabels, classGeneLabels)
|
1396: missingGenes <- classGenes[which(!classGenes %in% rownames(genesInfoList[[cl]]))]
|
1408: # - Add classification nodes Network
|
1411: # Extract CLASSIFICATIONgenesNetwork if available/needed & add to list
|
1414: if(!is.null(classificationGenes) && plotClassifcationGenesNetwork)
|
1416: classificationGenesID <- getRanking(classificationGenes, showGeneLabels=FALSE, showGeneID=TRUE)$geneID[, nwClasses, drop=FALSE]
|
1417: classificationGenesNetwork <- getSubNetwork(genesNetwork, classificationGenesID)
|
1418: names(classificationGenesNetwork) <- paste(names(classificationGenesNetwork), " - Classification Genes",sep="")
|
1420: clToAdd <- which(sapply(genesNetwork, function(x){length(getNodes(x))}) - sapply(classificationGenesNetwork, function(x){length(getNodes(x))}) != 0)
|
1423: warning("Only the classification genes network was provided. Only 'AllNodesNetwork' will be plotted.")
|
1431: genesNetwork <- c(genesNetwork[1:pos], classificationGenesNetwork[clToAdd[i]], genesNetwork[-(1:pos)])
|
1433: genesInfoList <- c(genesInfoList[1:pos], list(genesInfoList[[i]][classificationGenesID[,clToAdd[i]][!is.na(classificationGenesID[,i])],] ), genesInfoList[-(1:pos)])
|
1434: names(genesInfoList)[pos+1] <- names(classificationGenesNetwork[clToAdd[i]])
|
1440: # (Needs to be added after classific. in order to add it right after the "full" network)
|
1474: if( numClasses>25 ) stop("Too many classes to draw in a single plot. Use 'pdf' instead.")
|
1485: classGenes <- unique(c(genesNetwork[[nw]]@edges[,"gene1"],genesNetwork[[nw]]@edges[,"gene2"]))
|
1487: if((is.null(genesInfoList) || nrow(genesInfoList[[nw]])==0 ) || any(!classGenes %in% rownames(genesInfoList[[nw]])))
|
1490: } else classGraph <- igraph::graph.data.frame(as.data.frame(genesNetwork[[nw]]@edges[,ntwColnames,drop=FALSE]), ...(15 bytes skipped)...
|
1493: classGraph <- igraph::graph.data.frame(as.data.frame(genesNetwork[[nw]]@edges[,ntwColnames,drop=FALSE]), ...(101 bytes skipped)...
|
1495: if (igraph::vcount(classGraph) != 0)
|
1501: graphLayout <- igraph::layout.fruchterman.reingold(classGraph) # .grid is faster, but the result looks far worse.
|
1509: vertexLabels <- igraph::get.vertex.attribute(classGraph,"name")
|
1515: if(!is.null(igraph::get.vertex.attribute(classGraph,"exprsMeanDiff")))
|
1517: exprsDiff <- as.numeric(igraph::get.vertex.attribute(classGraph,"exprsMeanDiff"))
|
1539: if(!is.null(igraph::get.vertex.attribute(classGraph,"discriminantPower")))
|
1541: discPower<-round(as.numeric(igraph::get.vertex.attribute(classGraph,"discriminantPower")))
|
1552: # Shape: Classification gene
|
1555: if(!is.null(igraph::get.vertex.attribute(classGraph,"discriminantPower")))
|
1560: if(!is.null(classificationGenes)) # alguna comprobacion mas?
|
1562: vertexShape[which(igraph::get.vertex.attribute(classGraph,"name")%in% as.vector(getRanking(classificationGenes, showGeneID=TRUE)$geneID))] <- "square"
|
1567: relColors <- ifelse( igraph::get.edge.attribute(classGraph,"relation")==levels(factor(igraph::get.edge.attribute(classGraph,"relation")))[1], relColors[1],relColors[2])
|
1571: if(igraph::ecount(classGraph) > 0)
|
1573: igraph::tkplot(classGraph, layout=graphLayout, vertex.label=vertexLabels, vertex.label.family="sans", vertex.color=vert...(178 bytes skipped)...
|
1583: plot(classGraph, layout=graphLayout, vertex.label=vertexLabels, vertex.label.family="sans", vertex.label.cex=...(219 bytes skipped)...
|
1586: graphList <- c(graphList, graph=list(classGraph))
|
1607: text(0,0.6,"Node shape: Chosen/Not chosen for classification", pos=4, font=2)
|
5: # queryGeNetClassifier
|
21: # queryGeNetClassifier:
|
106: mxcf <- cbind(mxcf, matrix(ncol=length(missingClasses), nrow=dim(mxcf)[1], data=0))
|
107: colnames(mxcf)[which(colnames(mxcf)=="")]<-missingClasses
|
114: mxcf <- rbind(mxcf, matrix(nrow=length(missingClasses), ncol=dim(mxcf)[2], data=0))
|
115: rownames(mxcf)[which(rownames(mxcf)=="")]<-missingClasses
|
129: #nclasses <- dim(mxcf)[1]
|
131: numNA <- sum(mxcf[,nclasses+1])
|
137: falseNegatives <- array(0,dim=nclasses)
|
138: falsePositives <- array(0,dim=nclasses)
|
139: trueNegatives <- array(0,dim=nclasses)
|
140: truePositives <- array(0,dim=nclasses)
|
144: for(j in 1:nclasses) #dim(mxcf)[2]) Para incluir NA
|
156: for (i in 1:nclasses) #We need another loop in order to have the whole trueNegatives ready
|
175: # Can receive the result from executing queryGeNetClassifier, or a list of several: queryResult<-c(assignment1, assignment2)
|
229: # Can receive the result from executing queryGeNetClassifier, or a list of several: queryResult<-c(prediction1, prediction2)
|
252: stats <- cbind(c(rep(0,numClasses)), c(rep(1,numClasses)), c(rep(0,numClasses)),c(rep(NA,numClasses)),c(rep(NA,numClasses)))
|
257: for (c in 1:numClasses)
|
321: ...(12 bytes skipped)...nts <- function(queryResult, realLabels, minProbAssignCoeff=1, minDiffAssignCoeff=0.8, totalNumberOfClasses=NULL, pointSize=0.8, identify=FALSE)
|
340: numClasses <- totalNumberOfClasses
|
357: rand <- 1/numClasses
|
358: if(numClasses>2) { minProb <- 2*rand * minProbAssignCoeff
|
364: if(numClasses>2)
|
377: if(numClasses>2) graphics::text(0.3, 0.95, labels="Not Assigned", col="#606362", cex=0.8)
|
513: colnames(meanExprDiff) <- gClasses(genesRanking)
|
526: if (length(gClasses(genesRanking)) > 2){ ord <- genesRanking@ord[1:numGenesPlot,]
|
535: if((numClasses>3 && numClasses<10) && ("RColorBrewer" %in% rownames(utils::installed.packages())))
|
537: cols <- RColorBrewer::brewer.pal(numClasses,"Set1")
|
538: }else cols <- grDevices::rainbow(numClasses)
|
547: for(i in 1:numClasses)
|
555: legend("bottomleft", paste( gClasses(genesRanking)," (",lp," genes)",sep=""), lty=1, col=cols, pch=pchs)
|
700: for(i in 1:numClasses) #Por si no estan agrupados
|
731: if( numClasses == 0 || !is.matrix(genes) ) {
|
992: if(longClassNames)
|
1102: if(longClassNames){ tit<- paste(tit,"DP: ", sep="")
|
1105: barplot(rep(0,numClasses),add=FALSE, ylim=lims, main=tit, col=mycols, width=0.9, space=0.1, cex.main=1)
|
1217: if(!is.logical(plotClassifcationGenesNetwork)) stop("plotClassifcationGenesNetwork should be either TRUE or FALSE.")
|
1248: if(!(returniGraphs || plotAllNodesNetwork || plotOnlyConnectedNodesNetwork || plotClassifcationGenesNetwork)) stop("No network plots have been requested.")
|
1249: if(!(plotAllNodesNetwork || plotOnlyConnectedNodesNetwork || plotClassifcationGenesNetwork)) warning("No network plots have been requested, only the iGraph will be return...(13 bytes skipped)...
|
1252: if(is(genesNetwork, "GeNetClassifierReturn"))
|
1264: }else stop("'genesNetwork' is the return of geNetClassifier, but doesn't contain a genesNetwork.")
|
1276: # if (nwClasses[1] == nwClasses[2]) nwClasses <- nwClasses[1]
|
1280: names(genesNetwork) <- nwClasses[1]
|
1320: for( cl in nwClasses)
|
1460: genesNetwork <- genesNetwork[-which(names(genesNetwork) %in% nwClasses)]
|
1475: cols <- ceiling(sqrt(numClasses))
|
1476: rows <- ifelse(sqrt(numClasses)<round(sqrt(numClasses)), ceiling(sqrt(numClasses)),round(sqrt(numClasses)))
|
HiCBricks:R/Brick_functions.R: [ ] |
---|
2168: Matrix <- Brick_get_matrix(Brick = Brick, chr1 = chr1, chr2 = chr2,
|
2255: Matrix <- Brick_get_vector_values(Brick = Brick, chr1=chr1, chr2=chr2,
|
554: Matrix_info <- return_configuration_matrix_info(Brick)
|
776: Matrix.list.df <- do.call(rbind,chr1.list)
|
1613: Matrix.list <- Brick_list_matrices(Brick = Brick, chr1 = chr1,
|
1657: Matrix.list <- Brick_list_matrices(Brick = Brick, chr1 = chr1, chr2 = chr2,
|
1713: Matrix.list <- Brick_list_matrices(Brick = Brick, chr1 = chr1, chr2 = chr2,
|
1803: Matrix.list <- Brick_list_matrices(Brick = Brick, chr1 = chr1, chr2 = chr2,
|
1898: Matrix.list <- Brick_list_matrices(Brick = Brick, chr1 = chr1, chr2 = chr2,
|
2364: Class.type <- ._Check_numeric
|
2365: Class.exp <- c("numeric","integer")
|
10: #' project. At the end, this function will return a S4 object of class
|
74: #' A value of length 1 of class character or numeric specifying the resolution
|
138: #' the function will return an object of class BrickContainer.
|
555: current_resolution <- vapply(Matrix_info, function(a_list){
|
561: chrom1_binned_length <- vapply(Matrix_info[current_resolution],
|
565: chrom1s <- vapply(Matrix_info[current_resolution],
|
569: chrom1_max_sizes <- vapply(Matrix_info[current_resolution],
|
646: #' An object of class ranges specifying the ranges to store in the Brick.
|
652: #' When an object of class BrickContainer is provided, resolution defines the
|
661: #' When an object of class BrickContainer is provided, num_cpus defines the
|
692: if(!(class(ranges) %in% "GRanges") | ("list" %in% class(ranges))){
|
693: stop("Object of class Ranges expected")
|
777: rownames(Matrix.list.df) <- NULL
|
778: return(Matrix.list.df)
|
954: BrickContainer_class_check(Brick)
|
1127: #' Indexes is a column of class \code{IRanges::IntegerList}, which is
|
1169: stop("Provided chr, start, end do not match expected class ",
|
1314: #' Matrix_file <- system.file(file.path("extdata",
|
1319: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1326: BrickContainer_class_check(Brick)
|
1367: Matrix.file = matrix_file, delim = delim, Group.path = Group.path,
|
1411: #' Matrix_file <- system.file(file.path("extdata",
|
1416: #' chr = "chr2L", resolution = 100000, matrix_file = Matrix_file,
|
1462: Matrix.file = matrix_file, delim = delim, Group.path = Group.path,
|
1596: #' Matrix_file <- system.file(file.path("extdata",
|
1601: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1615: return(Matrix.list[Matrix.list$chr1 == chr1 &
|
1616: Matrix.list$chr2 == chr2, "done"])
|
1640: #' Matrix_file <- system.file(file.path("extdata",
|
1645: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1659: return(Matrix.list[Matrix.list$chr1 == chr1 &
|
1660: Matrix.list$chr2 == chr2, "sparsity"])
|
1692: #' Matrix_file <- system.file(file.path("extdata",
|
1697: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1715: return((Matrix.list[Matrix.list$chr1 == chr1 &
|
1716: Matrix.list$chr2 == chr2, "distance"]))
|
1747: #' Matrix_file <- system.file(file.path("extdata",
|
1752: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1786: #' Matrix_file <- system.file(file.path("extdata",
|
1791: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1805: Filter <- Matrix.list$chr1 == chr1 & Matrix.list$chr2 == chr2
|
1806: Extent <- c(Matrix.list[Filter, "min"],Matrix.list[Filter, "max"])
|
1832: #' Matrix_file <- system.file(file.path("extdata",
|
1837: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1881: #' Matrix_file <- system.file(file.path("extdata",
|
1886: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
1900: Filter <- Matrix.list$chr1 == chr1 & Matrix.list$chr2 == chr2
|
1901: Extent <- Matrix.list[Filter, "filename"]
|
1947: #' Matrix_file <- system.file(file.path("extdata",
|
1952: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2098: #' Matrix_file <- system.file(file.path("extdata",
|
2103: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2136: " found x_coords class ", class(x_coords), " and y_coords class ",
|
2137: class(y_coords))
|
2154: stop(chr1," ",chr2," matrix is yet to be loaded into the class.")
|
2171: return(Matrix)
|
2211: #' Matrix_file <- system.file(file.path("extdata",
|
2216: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2245: stop(chr1,chr2," matrix is yet to be loaded into the class.\n")
|
2258: return(Matrix)
|
2260: return(FUN(Matrix))
|
2320: #' Matrix_file <- system.file(file.path("extdata",
|
2325: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2357: stop("Provided Chromosomes does not appear to be of class character")
|
2368: Class.type <- is.character
|
2369: Class.exp <- "character"
|
2371: if(!Class.type(vector)){
|
2372: stop("vector must be of class ",
|
2373: ifelse(length(Class.exp)>1,paste(Class.exp,collapse=" or "),
|
2374: paste(Class.exp))," when by has value ",by)
|
2477: #' Matrix_file <- system.file(file.path("extdata",
|
2482: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2501: stop("Provided Chromosomes does not appear to be of class character")
|
2539: #' chromosome pair provided an object of class BrickContainer, and values for
|
2546: #' @return Returns an object of class matrix with dimensions corresponding to
|
2563: #' Matrix_file <- system.file(file.path("extdata",
|
2568: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2579: stop("Provided Chromosomes does not appear to be of class character")
|
2636: #' Matrix_file <- system.file(file.path("extdata",
|
2641: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2653: BrickContainer_class_check(Brick)
|
2659: stop("Matrix for this chromsome pair does not exist.\n")
|
2663: stop("Matrix for this chromsome pair is yet to be loaded.\n")
|
2716: #' `Brick_export_to_sparse` will accept as input an object of class
|
2746: #' Matrix_file <- system.file(file.path("extdata",
|
2751: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2833: #' Matrix_file <- system.file(file.path("extdata",
|
2838: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2847: BrickContainer_class_check(Brick)
|
2900: #' Matrix_file <- system.file(file.path("extdata",
|
2905: #' chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
|
2921: BrickContainer_class_check(Brick)
|
173: Reference.object <- GenomicMatrix$new()
|
330: Reference.object <- GenomicMatrix$new()
|
426: Reference.object <- GenomicMatrix$new()
|
468: Reference.object <- GenomicMatrix$new()
|
549: Reference.object <- GenomicMatrix$new()
|
617: Reference.object <- GenomicMatrix$new()
|
691: Reference.object <- GenomicMatrix$new()
|
756: Reference.object <- GenomicMatrix$new()
|
810: Reference.object <- GenomicMatrix$new()
|
892: Reference.object <- GenomicMatrix$new()
|
953: Reference.object <- GenomicMatrix$new()
|
1086: Reference.object <- GenomicMatrix$new()
|
1325: Reference.object <- GenomicMatrix$new()
|
1366: RetVar <- ._ProcessMatrix_(Brick = Brick_filepath,
|
1423: Reference.object <- GenomicMatrix$new()
|
1535: Reference.object <- GenomicMatrix$new()
|
1608: Reference.object <- GenomicMatrix$new()
|
1652: Reference.object <- GenomicMatrix$new()
|
1704: Reference.object <- GenomicMatrix$new()
|
1798: Reference.object <- GenomicMatrix$new()
|
1848: Reference.object <- GenomicMatrix$new()
|
1893: Reference.object <- GenomicMatrix$new()
|
1977: Reference.object <- GenomicMatrix$new()
|
2494: Reference.object <- GenomicMatrix$new()
|
2575: Reference_object <- GenomicMatrix$new()
|
2651: Reference.object <- GenomicMatrix$new()
|
2707: Reference.object <- GenomicMatrix$new()
|
2760: Reference.object <- GenomicMatrix$new()
|
2920: Reference.object <- GenomicMatrix$new()
|
singleCellTK:inst/shiny/server.R: [ ] |
---|
4039: shinyjs::addClass(id = "cv_button1", class = "btn-block")
|
4937: classes <- names(colData(hmTemp$sce))
|
6037: classCol <- colData(vals$counts)[[input$deC1Class]]
|
6038: classChoices <- sort(as.vector(unique(classCol)))
|
98: updateSelectInput(session, "deC1Class",
|
245: label = "Select Input Matrix:",
|
249: label = "Select Input Matrix:",
|
255: label = "Select Input Matrix:",
|
2670: shinyjs::show(selector = ".dimRedPCAICA_plotTabset_class")
|
4040: shinyjs::addClass(id = "cv_button2", class = "btn-block")
|
4041: shinyjs::addClass(id = "cv_button3", class = "btn-block")
|
4461: pltVars$class <- "factor"
|
4463: pltVars$class <- "numeric"
|
4516: conditionClass = pltVars$class, defaultTheme = as.logical(pltVars$defTheme))
|
4532: ...(28 bytes skipped)... legendSize = input$adjustlegendsize,legendTitleSize = input$adjustlegendtitlesize,conditionClass = pltVars$class)
|
4998: ...(7 bytes skipped)... p("Since more than 12 unique values detected, discrete colors will be assigned for this class")
|
5021: p(paste0("Totally ", nUniq, " unique values in this class of annotation, which is too many to provide manual selection. Coloring will be provided by default....(3 bytes skipped)...
|
5054: p("No effective category found for the class.")
|
5380: selectInput("batchCheckCorrName", "Corrected Matrix",
|
6036: !input$deC1Class == "None"){
|
6049: !input$deC1Class == "None"){
|
6050: classCol <- colData(vals$counts)[[input$deC1Class]]
|
6063: g1Idx <- colData(vals$counts)[[input$deC1Class]] %in% input$deC1G1
|
6077: g2Idx <- colData(vals$counts)[[input$deC1Class]] %in% input$deC1G2
|
6259: class = input$deC1Class,
|
3377: conditionClass = "factor",
|
3426: conditionClass = "factor",
|
4938: selectInput('hmCellAnn', 'Add cell annotation', classes,
|
4945: classes <- names(rowData(hmTemp$sce))
|
4946: selectInput('hmGeneAnn', 'Add feature annotation', classes,
|
5463: conditionClass = "character",
|
5471: conditionClass = "character",
|
6040: choices = classChoices, multiple = TRUE)
|
6051: classChoices <- sort(as.vector(unique(classCol)))
|
6053: choices = classChoices, multiple = TRUE)
|
6260: classGroup1 = input$deC1G1,
|
6261: classGroup2 = input$deC1G2,
|
7251: vals$effectSizes <- calcEffectSizes(countMatrix = expData(vals$counts, input$snapshotAssay), condition = colData(vals$counts)[, input$selectSnapsho...(12 bytes skipped)...
|
decoupleR:R/utils-dataset-converters.R: [ ] |
---|
89: class = "quo_missing_error"
|
209: class = "different_set_columns"
|
95: class = "quo_null_error"
|
231: #' @param mat Matrix in matrix format.
|
MotifDb:misc/hocomoco-v11/importV11.R: [ ] |
---|
382: class <- substr(x, 12, 12)
|
302: rawMatrixList <- readRawMatrices("./", dataDir)
|
384: tbl.secondary$dataSource[unmapped.secondary.only] <- paste0("HOCOMOCOv11-secondary-", class[unmapped.secondary.only])
|
385: tbl.secondary$dataSource[mapping] <- paste0("HOCOMOCOv11-core-", class[mapping])
|
303: length(rawMatrixList)
|
304: matrices <- extractMatrices (rawMatrixList)
|
Pi:R/xMLrandomforest.r: [ ] |
---|
89: class <- as.factor(gs_targets[!is.na(ind)])
|
88: df_predictor_class <- as.data.frame(df_predictor[ind[!is.na(ind)],])
|
3: ...(283 bytes skipped)... in rows and predictors in columns, with their predictive scores inside it. It returns an object of class 'sTarget'.
|
9: ...(71 bytes skipped)...idataion. Per fold creates balanced splits of the data preserving the overall distribution for each class (GSP and GSN), therefore generating balanced cross-vallidation train sets and testing sets. By defa...(44 bytes skipped)...
|
20: #' an object of class "sTarget", a list with following components:
|
32: #' \item{\code{evidence}: an object of the class "eTarget", a list with following components "evidence" and "metag"}
|
86: ## predictors + class
|
90: df_predictor_class$class <- class
|
94: ...(40 bytes skipped)...ds (%d in GSP, %d in GSN) are used for supervised integration of %d predictors/features (%s).", sum(class==1), sum(class==0), ncol(df_predictor), as.character(now)), appendLF=TRUE)
|
104: message(sprintf("2. GS matrix of %d rows/genes X %d columns (predictors+class) are used as train set (%s) ...", nrow(df_predictor_class), ncol(df_predictor_class), as.character(now)), appendLF=TRUE)
|
106: message(sprintf("2. GS matrix of %d rows/genes X %d columns (predictors+class...(102 bytes skipped)...e remaining '1/%d' as test set. These spits are repeated over %d times (%s) ...", nrow(df_predictor_class), ncol(df_predictor_class), nfold, nfold-1, nfold, nfold, nrepeat, as.character(now)), appendLF=TRUE)
|
112: # preserve the overall class distribution
|
116: index_sets <- caret::createMultiFolds(y=df_predictor_class$class, k=nfold, times=nrepeat)
|
121: res_ls <- caret::createFolds(y=df_predictor_class$class, k=nfold, list=TRUE, returnTrain=TRUE)
|
143: trainset <- df_predictor_class[index_sets[[i]],]
|
146: message(sprintf("\tFold %d: %d GSP + %d GSN", i, table(trainset$class)[2], table(trainset$class)[1]), appendLF=TRUE)
|
159: #suppressMessages(rf.model <- randomForest::randomForest(class ~ ., data=trainset, importance=TRUE, ntree=ntree, mtry=mtry, ...))
|
160: suppressMessages(rf.model <- randomForest::randomForest(class ~ ., data=trainset, importance=TRUE, ntree=ntree, mtry=mtry))
|
166: trainset <- df_predictor_class[trainindex,]
|
169: message(sprintf("\tRepeatFold %d: %d GSP + %d GSN", i, table(trainset$class)[2], table(trainset$class)[1]), appendLF=TRUE)
|
183: #suppressMessages(rf.model <- randomForest::randomForest(class ~ ., data=trainset, importance=TRUE, ntree=ntree, mtry=mtry, ...))
|
184: suppressMessages(rf.model <- randomForest::randomForest(class ~ ., data=trainset, importance=TRUE, ntree=ntree, mtry=mtry))
|
194: ...(51 bytes skipped)...eature importance matrix of %d rows/predictors X %d columns/repeats*folds (%s).", ncol(df_predictor_class)-1, nfold*nrepeat, as.character(now)), appendLF=TRUE)
|
229: trainset <- df_predictor_class
|
240: suppressMessages(rf.model.overall <- randomForest::randomForest(class ~ ., data=trainset, importance=TRUE, ntree=ntree, mtry=mtry))
|
241: rf.model.overall.importance <- randomForest::importance(rf.model.overall, type=NULL, class=NULL, scale=TRUE)[,3:4]
|
249: ...(38 bytes skipped)...OC matrix of %d rows (Supervised + predictors) X %d columns/repeats*folds (%s).", ncol(df_predictor_class), nfold*nrepeat, as.character(now)), appendLF=TRUE)
|
259: testset <- df_predictor_class[-trainindex,]
|
351: ...(54 bytes skipped)...atrix of %d rows/genes X %d columns/repeats*folds, aggregated via '%s' (%s) ...", nrow(df_predictor_class), nfold*nrepeat, fold.aggregateBy, as.character(now)), appendLF=TRUE)
|
473: class(sTarget) <- "sTarget"
|
37: #' @seealso \code{\link{xPierMatrix}}, \code{\link{xSparseMatrix}}, \code{\link{xPredictROCR}}, \code{\link{xPredictCompare}}, \code{\link{xSymbol2GeneID}}
|
58: df_predictor <- xPierMatrix(list_pNode, displayBy="score", combineBy="union", aggregateBy="none", RData.location=RData.location...(12 bytes skipped)...
|
62: eTarget <- xPierMatrix(list_pNode, displayBy="evidence", combineBy="union", aggregateBy="none", verbose=FALSE, RData.locat...(30 bytes skipped)...
|
206: df_res <- as.matrix(xSparseMatrix(df_res, verbose=FALSE))
|
294: df_res <- as.matrix(xSparseMatrix(df_res[,-4], verbose=FALSE))
|
317: df_res <- as.matrix(xSparseMatrix(df_res[,-3], verbose=FALSE))
|
362: df_full <- as.matrix(xSparseMatrix(df_full, verbose=FALSE))
|
pcaExplorer:R/pcaExplorer.R: [ ] |
---|
2684: class = "footer",
|
84: class = "btn_no_border",
|
225: # class = "btn btn-info"),
|
307: downloadButton("downloadData", "Download", class = "btn btn-success"),
|
318: actionButton("compute_pairwisecorr", "Run", class = "btn btn-primary"),
|
735: actionButton("composemat", "Compose the matrix", icon = icon("spinner"), class = "btn btn-primary"),
|
818: actionButton("updatepreview_button", "Update report", class = "btn btn-primary"), p()
|
820: column(3, downloadButton("saveRmd", "Generate & Save", class = "btn btn-success"))
|
971: class = "btn btn-primary", icon = icon("spinner")),
|
974: class = "btn btn-primary", icon = icon("spinner")),
|
977: class = "btn btn-primary", icon = icon("spinner"))
|
1130: actionButton(inputId = "show_cm", label = HTML("Show </br>count matrix"), class = "btn btn-success")
|
1139: actionButton(inputId = "show_metadata", label = HTML("Show </br>sample metadata"), class = "btn btn-success")
|
1148: actionButton(inputId = "show_dds", label = HTML("Show </br><code>dds</code> object"), class = "btn btn-success")
|
1157: actionButton(inputId = "show_annotation", label = HTML("Show </br>gene annotation"), class = "btn btn-success")
|
1207: actionButton("button_diydds", label = HTML("Generate the dds and </br>dst objects"), class = "btn btn-success"),
|
2008: actionButton("computepca2go", "Compute the PCA2GO object", icon = icon("spinner"), class = "btn btn-primary")
|
2140: class(input$pc_x)
|
2142: class(datatable(values$mypca2go[[paste0("PC", input$pc_x)]][["posLoad"]]))
|
2687: class = "foot-inner",
|
31: #' dds_airway <- DESeq2::DESeqDataSetFromMatrix(assay(airway),
|
1239: values$mydds <- DESeqDataSetFromMatrix(countData = values$mycountmatrix,
|
1295: values$mydds <- DESeqDataSetFromMatrix(countData = values$mycountmatrix,
|
spatialHeatmap:inst/extdata/shinyApp/R/global.R: [ ] |
---|
312: lapply(ft, function(i) { tag("span", list(class = class(i), tags$span(class = "glyphicon glyphicon-move"), i)) }
|
321: span(class = "panel panel-default",
|
322: div(class = "panel-heading", x),
|
323: div(class = "panel-body", id = ns(x))
|
328: span(class = "panel panel-default",
|
329: div(class = "panel-heading", names(x)),
|
330: div(class = "panel-body", id = ns(names(x)), ft2tag(x[[1]]))
|
350: span(class = "panel panel-default", style = 'margin-left:0px',
|
351: div(class = "panel-heading", strong(to.div.tit)),
|
352: div(class = "panel-body", id = ns(to.div.id), ft2tag(to.ft))
|
354: div(class = "panel panel-default",
|
355: div(class = "panel-heading", strong(from.div.tit)),
|
181: if (is(input, 'dgCMatrix')|is(input, 'matrix')) input <- as.data.frame(as.matrix(input))
|
ISAnalytics:R/utility-functions.R: [ ] |
---|
39: purrr::walk(desc_msg, ~ rlang::inform(.x, class = "tag_inspect"))
|
494: rlang::inform(warn_msg, class = "missing_quant_specs")
|
638: rlang::inform(err_msg, class = "skip_col_transform")
|
737: rlang::inform(.nas_introduced_msg(), class = "comp_nas")
|
966: rlang::inform(msg, class = "launch_af_empty")
|
1175: rlang::inform(no_stats_msg, class = "no_stats_warn")
|
504: rlang::abort(err_msg, class = "miss_annot_suff_specs")
|
516: rlang::inform("Matrix suffixes specs successfully changed")
|
532: rlang::inform("Matrix suffixes specs reset to default")
|
1304: rlang::inform("Matrix suffixes specs successfully changed")
|
GRaNIE:R/plot.R: [ ] |
---|
973: dplyr::mutate(class = paste0("real_",range))) %>%
|
2412: dplyr::mutate(Class = dplyr::if_else(.data$isTF, "TF", "gene"))
|
3187: dplyr::mutate(class = droplevels(factor(class, levels = c("TF", "peak (TF end)", "peak (gene end)", "gene")))) %>% # in case it was the TF-gene d...(50 bytes skipped)...
|
985: class_levels = c(paste0("real_",range), paste0("random_",range))
|
1017: peak_gene.p.raw.class = cut(.data$peak_gene.p_raw, breaks = seq(0,1,0.05), include.lowest = TRUE, ordered_result = TRUE),...(0 bytes skipped)...
|
1018: peak_gene.r.class = cut(.data$peak_gene.r, breaks = seq(-1,1,0.05), include.lowest = TRUE, ordered_result = TRUE)) %>...(1 bytes skipped)...
|
1036: colors_class = c("black", "black")
|
1040: r_pos_class = c("black", "darkgray")
|
1043: dist_class = c("dark red", "#fc9c9c")
|
1047: freq_class = paste0(gsub(names(freqs), pattern = "(.+)(_.*)", replacement = "\\1"), " (n=", .prettyNum(freqs) ...(6 bytes skipped)...
|
1053: xlabels_peakGene_r.class = levels(peakGeneCorrelations.all$peak_gene.r.class)
|
1062: xlabels_peakGene_praw.class = levels(peakGeneCorrelations.all$peak_gene.p.raw.class)
|
1148: customLabel_class = .customLabeler(table(peakGeneCorrelations.all[indexCur,]$class))
|
1015: peak_gene.distance_class_abs = forcats::fct_explicit_na(addNA(cut(abs(.data$peak_gene.distance),
|
1058: xlabels_peakGene_r.class2 = levels(peakGeneCorrelations.all$peak_gene.r.class)
|
1425: dplyr::mutate(peak_gene.distance.class250k = factor(dplyr::if_else(.data$peak_gene.distance <= 250000, "<=250k", ">250k"))) %>%
|
1462: distance_class_abund = table(peakGeneCorrelations.all[indexCur,]$peak_gene.distance_class_abs)
|
547: GC_classes_background_GC.df = peaksBackgroundGC %>%
|
555: GC_classes_all2.df = rbind(GC_classes_foreground.df, GC_classes_background.df, GC_classes_background_GC.df) %>%
|
1009: nClasses_distance = 10
|
9: #' Produce a PCA plot of the data from a \code{\linkS4class{GRN}} object
|
23: #' @return An updated \code{\linkS4class{GRN}} object.
|
321: # data: Matrix of your data, with column names. May or may not be vsd transformed, log2 transformed etc
|
440: #' Plot diagnostic plots for TF-peak connections for a \code{\linkS4class{GRN}} object
|
455: #' @return An updated \code{\linkS4class{GRN}} object.
|
548: dplyr::group_by(.data$GC_class) %>%
|
551: tidyr::complete(.data$GC_class, fill = list(n = 0)) %>%
|
557: dplyr::left_join(GC_classes_all.df, by = "GC_class") %>%
|
571: g1 = ggplot2::ggplot(GC_classes_all2.df , ggplot2::aes(.data$GC_class, .data$n_rel, group = .data$type, fill = .data$type, label = .data$n.bg.needed.relFreq)) +
|
579: ggplot2::xlab("GC class from peaks") +
|
584: g2 = ggplot2::ggplot(GC_classes_all2.df , ggplot2::aes(.data$GC_class, log10(.data$n+1), group = .data$type, fill = .data$type)) +
|
590: ggplot2::xlab("GC class from peaks") +
|
834: #' Plot diagnostic plots for peak-gene connections for a \code{\linkS4class{GRN}} object
|
848: #' @return An updated \code{\linkS4class{GRN}} object.
|
975: dplyr::mutate(class = paste0("random_",range)))
|
994: dplyr::mutate(class = factor(paste0("real_",range), levels = class_levels)),
|
996: dplyr::mutate(class = factor(paste0("random_",range), levels = class_levels))) %>%
|
1013: peak_gene.distance_class =
|
1023: levels(peakGeneCorrelations.all$peak_gene.distance_class_abs)[1] =
|
1024: gsub("(-\\d+)", "0", levels(peakGeneCorrelations.all$peak_gene.distance_class_abs)[1], perl = TRUE)
|
1029: dplyr::mutate(peak_gene.p_raw.robust.class =
|
1037: names(colors_class)= unique(peakGeneCorrelations.all$class)
|
1038: colors_class[which(grepl("random", names(colors_class)))] = "darkgray"
|
1041: names(r_pos_class) =c("TRUE", "FALSE")
|
1044: names(dist_class) = class_levels
|
1046: freqs= table(peakGeneCorrelations.all$class)
|
1049: freq_class = gsub(freq_class, pattern = "random", replacement = "permuted")
|
1050: names(freq_class) <- names(freqs)
|
1054: nCur = length(xlabels_peakGene_r.class)
|
1055: xlabels_peakGene_r.class[setdiff(seq_len(nCur), c(1, floor(nCur/2), nCur))] <- ""
|
1059: nCur = length(xlabels_peakGene_r.class2)
|
1060: xlabels_peakGene_r.class2[setdiff(seq_len(nCur), c(1, floor(nCur/4), floor(nCur/2), floor(nCur/4*3), nCur))] <- ""
|
1063: nCur = length(xlabels_peakGene_praw.class)
|
1064: xlabels_peakGene_praw.class[setdiff(seq_len(nCur), c(1, floor(nCur/2), nCur))] <- ""
|
1137: indexCurReal = intersect(indexCur, which(peakGeneCorrelations.all$class == names(dist_class)[1]))
|
1147: # Produce the labels for the class-specific subtitles
|
1162: ggplot2::facet_wrap(~ .data$class, labeller = ggplot2::labeller(class=freq_class) ) +
|
1164: ggplot2::scale_color_manual(labels = names(r_pos_class), values = r_pos_class) +
|
1176: xlabels = levels(tbl.l$d_merged$peak_gene.p.raw.class)
|
1179: gB3 = ggplot2::ggplot(tbl.l$d_merged, ggplot2::aes(.data$peak_gene.p.raw.class, .data$ratio, fill = .data$classAll)) +
|
1183: ggplot2::scale_fill_manual("Class", values = c(dist_class, r_pos_class),
|
1186: ggplot2::scale_x_discrete(labels = xlabels_peakGene_praw.class) +
|
1200: sum_real = table(peakGeneCorrelations.all[indexCur,]$class)[names(dist_class)[1]]
|
1201: sum_rnd = table(peakGeneCorrelations.all[indexCur,]$class)[names(dist_class)[2]]
|
1203: dplyr::group_by(class) %>%
|
1204: dplyr::count(.data$peak_gene.r.class) %>%
|
1205: dplyr::mutate(nnorm = dplyr::case_when(class == !! (names(dist_class)[1]) ~ .data$n / (sum_real / sum_rnd),
|
1210: gD = ggplot2::ggplot(binData.r, ggplot2::aes(.data$peak_gene.r.class, .data$nnorm, group = .data$class, fill = .data$class)) +
|
1212: ggplot2::geom_line(ggplot2::aes(.data$peak_gene.r.class, .data$nnorm, group = .data$class, color= .data$class), stat = "identity") +
|
1213: ggplot2::scale_fill_manual("Group", labels = names(dist_class), values = dist_class) +
|
1214: ggplot2::scale_color_manual("Group", labels = names(dist_class), values = dist_class) +
|
1215: ggplot2::scale_x_discrete(labels = xlabels_peakGene_r.class2, drop = FALSE) +
|
1262: allVars = c("peak.annotation", "peak.GC.class", "peak.width", "peak.mean","peak.median",
|
1275: dplyr::select("peak_gene.p_raw", tidyselect::all_of(varCur), "class", "r_positive", "peak_gene.p.raw.class", "peak_gene.distance")
|
1278: dplyr::select("peak_gene.p_raw", "class", "gene.CV", "peak.CV", "r_positive", "peak_gene.p.raw.class", "peak_gene.distance")
|
1284: if (varCur %in% c("peak.annotation","peak.GC.class")) {
|
1290: newColName = paste0(varCur, ".class")
|
1360: # Class in the ggplot2::facet_wrap has been removed, as this is only for real data here
|
1371: dplyr::group_by(class, .data[[newColName]], .data$peak_gene.p.raw.class, .data$r_positive) %>%
|
1374: tidyr::complete(class, .data[[newColName]], .data$peak_gene.p.raw.class, .data$r_positive, fill = list(n = 0)) %>% # SOme cases might be missing
|
1375: dplyr::group_by(class, .data[[newColName]], .data$peak_gene.p.raw.class) %>% # dont group by r_positive because we want to calculate the ratio within each group
|
1379: dplyr::filter(.data$r_positive, class == names(dist_class)[1])# Keep only one r_positive row per grouping as we operate via the ratio and this data is duplic...(129 bytes skipped)...
|
1385: gB3 = ggplot2::ggplot(freq, ggplot2::aes(.data$peak_gene.p.raw.class, .data$ratio_pos_raw, fill = .data[[newColName]])) +
|
1389: ggplot2::scale_x_discrete(labels = xlabels_peakGene_praw.class) +
|
1395: ggplot2::facet_wrap(~ factor(class), nrow = 2, scales = "free_y", strip.position = "left", labeller = ggplot2::labeller(class=freq_class))
|
1439: ggplot2::facet_wrap(~ peak_gene.distance.class250k + .data[[newColName]], nrow = nrows_plot, scales = "free_y") +
|
1442: ggplot2::scale_fill_manual("Class for r", values = mycolors, labels = r_positive_label, drop = FALSE ) +
|
1463: indexFilt = which(peakGeneCorrelations.all$peak_gene.distance_class_abs %in%
|
1464: names(distance_class_abund)[which(distance_class_abund > 50)])
|
1470: ...(37 bytes skipped)...eCorrelations.all[indexFilt,], ggplot2::aes(.data$peak_gene.p_raw, color = .data$peak_gene.distance_class_abs)) + ggplot2::geom_density() +
|
1473: ggplot2::scale_color_viridis_d(labels = .classFreq_label(table(peakGeneCorrelations.all[indexFilt,]$peak_gene.distance_class_abs))) +
|
1483: ...(46 bytes skipped)...ations.all[indexFilt,], ggplot2::aes(.data$peak_gene.p_raw.robust, color = .data$peak_gene.distance_class_abs)) + ggplot2::geom_density() +
|
1486: ggplot2::scale_color_viridis_d(labels = .classFreq_label(table(peakGeneCorrelations.all[indexFilt,]$peak_gene.distance_class_abs))) +
|
1506: ggplot2::facet_wrap(~ peak_gene.distance_class_abs, ncol = 2, labeller = .customLabeler(table(peakGeneCorrelations.all$peak_gene.distance_class_abs))) +
|
1507: ggplot2::scale_color_manual(labels = .classFreq_label(table(peakGeneCorrelations.all[indexFilt,]$r_positive)), values = r_pos_class) +
|
1522: ...(30 bytes skipped)...akGeneCorrelations.all[indexCur,], ggplot2::aes(.data$peak_gene.r, color = .data$peak_gene.distance_class_abs)) + ggplot2::geom_density() +
|
1525: ggplot2::scale_color_viridis_d(labels = .classFreq_label(table(peakGeneCorrelations.all[indexCur,]$peak_gene.distance_class_abs))) +
|
1565: #' Plot various network connectivity summaries for a \code{\linkS4class{GRN}} object
|
1576: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
1908: #' Plot general structure and connectivity statistics for a filtered \code{\linkS4class{GRN}} object
|
1919: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
1965: totalVerteces = data.frame(Class = c("TF", "Peak", "Gene"),
|
1980: gVertexDist = ggplot2::ggplot(totalVerteces, ggplot2::aes(x="", y=.data$Count, fill=.data$Class)) + ggplot2::geom_bar(stat="identity") +
|
2139: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
2308: #' Plot general structure & connectivity statistics for each community in a filtered \code{\linkS4class{GRN}}
|
2324: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
2418: # Class: TF or gene
|
2419: ...(11 bytes skipped)...mmunityVertices = ggplot2::ggplot(communityVertices, ggplot2::aes(x = .data$community, fill = .data$Class)) +
|
2516: #' Plot community-based enrichment results for a filtered \code{\linkS4class{GRN}} object
|
2529: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
2887: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
3186: .id = "class") %>%
|
3188: dplyr::arrange(class, dplyr::desc(.data$Degree))
|
3193: gDegrees = ggplot2::ggplot(degrees.table, ggplot2::aes(x=.data$Degree, fill = class)) +
|
3199: ggplot2::facet_wrap(~class, labeller = ggplot2::labeller(class=.facetLabel(degrees.table)), scales = "free", ncol = 2) +
|
3204: dplyr::filter(class =="gene") %>%
|
3209: dplyr::filter(class =="TF") %>%
|
3316: dplyr::group_by(class) %>%
|
3318: dplyr::mutate(label = paste0(class, "\n(mean: ", round(mean, 1),
|
3324: names(labels) <- summary$class
|
3334: ...(1 bytes skipped)...' This function can visualize a filtered eGRN in a very flexible manner and requires a \code{\linkS4class{GRN}} object as generated by \code{\link{build_eGRN_graph}}.
|
3358: #' @return The same \code{\linkS4class{GRN}} object, without modifications.
|
35: checkmate::assertClass(GRN, "GRN")
|
70: matrixCur = getCounts(GRN, type = "rna", asMatrix = TRUE, includeFiltered = !removeFiltered)
|
93: matrixCur = getCounts(GRN, type = "peaks", asMatrix = TRUE, includeFiltered = !removeFiltered)
|
126: checkmate::assertClass(counts, "DESeqDataSet")
|
135: checkmate::assertMatrix(counts)
|
140: checkmate::assertMatrix(counts)
|
471: checkmate::assertClass(GRN, "GRN")
|
545: .generateTF_GC_diagnosticPlots <- function(TFCur, GC_classes_foreground.df, GC_classes_background.df, GC_classes_all.df, peaksForeground, peaksBackground, peaksBackgroundGC) {
|
562: GC_classes_all2.df$n.bg.needed.relFreq[GC_classes_all2.df$type != "background_GC" | GC_classes_all2.df$n == 0] = ""
|
867: checkmate::assertClass(GRN, "GRN")
|
1363: ggplot2::geom_density(ggplot2::aes(color = .data$classNew), color = "black", linetype = "dotted", alpha = 1) +
|
1440: ggplot2::xlab(xlabel) + ggplot2::ylab(paste0("Abundance for classes with n>=", nGroupsMin)) + ggplot2::theme_bw() +
|
1459: # Here, we focus on distance and exclude distance classes with too few points and create a new subset of the data
|
1461: # Filter distance classes with too few points
|
1589: checkmate::assertClass(GRN, "GRN")
|
1933: checkmate::assertClass(GRN, "GRN")
|
2156: checkmate::assertClass(GRN, "GRN")
|
2340: checkmate::assertClass(GRN, "GRN")
|
2548: checkmate::assertClass(GRN, "GRN")
|
2908: checkmate::assertClass(GRN, "GRN")
|
3369: checkmate::assertClass(GRN, "GRN")
|
1014: forcats::fct_explicit_na(addNA(cut(.data$peak_gene.distance, breaks = nClasses_distance, include.lowest = TRUE)), "random"),
|
1016: breaks = nClasses_distance, include.lowest = TRUE, ordered_result = TRUE)), "random"),
|
HiCBricks:R/backend_functions.R: [ ] |
---|
467: Matrix <- NULL
|
600: Matrix <- as.matrix(fread(file = Matrix.file, sep=delim, nrows=Iter,
|
374: Matrix.return <- rbind(Matrix.top,Matrix.bottom)
|
460: Matrix.range <- c(NA,NA)
|
563: Matrix.range <- c(NA,NA)
|
1: GenomicMatrix <- R6Class("GenomicMatrix",
|
548: ._ProcessMatrix_ <- function(Brick = NULL, Matrix.file = NULL, delim = NULL,
|
150: Matrix.range=NA,
|
357: ._Do_rbind_on_matrices_of_different_sizes_ <- function(Matrix.top = NULL,
|
358: Matrix.bottom = NULL, row.length = NULL, col.length = NULL,
|
360: if(is.null(Matrix.top)){
|
361: return(Matrix.bottom)
|
365: Matrix.top <- cbind(Matrix.top,matrix(NA,
|
366: nrow = nrow(Matrix.top), ncol = Makeup.col))
|
370: Matrix.bottom <- cbind(matrix(NA,
|
371: nrow = nrow(Matrix.bottom),
|
372: ncol = Makeup.col),Matrix.bottom)
|
375: return(Matrix.return)
|
388: ._Compute_various_matrix_metrics <- function(Matrix = NULL,
|
392: Bin.coverage <- vapply(seq_len(nrow(Matrix)),function(x){
|
393: Vec.sub <- Matrix[x,]
|
396: Row.sums <- vapply(seq_len(nrow(Matrix)),function(x){
|
397: Vec.sub <- Matrix[x,]
|
401: Sparsity.Index <- vapply(seq_len(nrow(Matrix)),function(x){
|
402: Vec.sub <- Matrix[x,]
|
411: Row.extent <- ._Do_on_vector_ComputeMinMax_(Matrix)
|
422: ._Compute_various_col_matrix_metrics <- function(Matrix = NULL,
|
424: Matrix[is.na(Matrix) | is.infinite(Matrix)] <- 0
|
426: metrics.list[["bin.coverage"]] + colSums(Matrix > 0)
|
428: colSums(Matrix)
|
446: ._Process_matrix_by_distance <- function(Brick = NULL, Matrix.file = NULL,
|
454: Handler <- .create_file_connection(Filename = Matrix.file, mode = "r")
|
473: if(is.null(Matrix)){
|
478: Matrix <- matrix(data = 0, nrow = num.rows,
|
485: Matrix[Row.loc, Col.loc] <- Vector[Col.lower.limit:Col.upper.limit]
|
489: Count <- c(nrow(Matrix),ncol(Matrix))
|
490: Metrics.list <- ._Compute_various_matrix_metrics(Matrix = Matrix,
|
492: sparsity.bins = sparsity.bins, range = Matrix.range,
|
494: Matrix.range <- Metrics.list[["extent"]]
|
504: data = Matrix, Start = Start, Stride = Stride, Count = Count)
|
507: Object.size <- object.size(Matrix)
|
508: Matrix <- NULL
|
538: Attr.vals <- c(basename(Matrix.file),as.double(Matrix.range),
|
605: Metrics.list <- ._Compute_various_matrix_metrics(Matrix = Matrix,
|
607: range = Matrix.range, distance = distance,
|
610: Matrix = Matrix,
|
612: Matrix.range <- Metrics.list[["extent"]]
|
617: Cumulative.data <- rbind(Cumulative.data,Matrix)
|
661: Attr.vals <- c(basename(Matrix.file),
|
662: as.double(Matrix.range),
|
91: TerrificNumberOfHiCFormats = c("NxNMatrix","PAIRIX","Cooler","HOMER",
|
230: Reference.object <- GenomicMatrix$new()
|
255: Reference.object <- GenomicMatrix$new()
|
309: Reference.object <- GenomicMatrix$new()
|
349: Reference.object <- GenomicMatrix$new()
|
450: Reference.object <- GenomicMatrix$new()
|
552: Reference.object <- GenomicMatrix$new()
|
678: Reference.object <- GenomicMatrix$new()
|
772: # Reference.object <- GenomicMatrix$new()
|
781: # Reference.object <- GenomicMatrix$new()
|
787: # Reference.object <- GenomicMatrix$new()
|
qmtools:R/reduceFeatures-functions.R: [ ] |
---|
113: res <- pcaMethods::nipalsPca(Matrix = x, nPcs = ncomp, ...)
|
48: ##' \linkS4class{SummarizedExperiment}-friendly wrapper for this function.
|
95: class(out) <- c("reduced.pca", class(out))
|
170: ##' \linkS4class{SummarizedExperiment}-friendly wrapper for this function.
|
214: class(out) <- c("reduced.tsne", class(out))
|
271: ##' \linkS4class{SummarizedExperiment}-friendly wrapper for this function.
|
331: class(out) <- c("reduced.plsda", "matrix", class(out))
|
223: ##' This function performs standard PLS for classification with the transpose of
|
hipathia:R/stats.R: [ ] |
---|
212: class <- "0"
|
354: class <- "0"
|
391: class <- "0"
|
51: #' @return Matrix of gene expression whose values are in [0,1].
|
218: class <- "DOWN" ## regarding DISEASE
|
220: class <- "UP" ## regarding DISEASE
|
223: class <- "UP"
|
225: class <- "DOWN"
|
227: class <- 0
|
231: result <- data.frame(pvalue, class, esti, stringsAsFactors = FALSE)
|
244: #' including the classes to compare, or a character vector with the class to
|
338: data2$class == "0" &
|
360: class <- "UP"
|
362: class <- "DOWN"
|
364: class <- "0"
|
368: class = class,
|
398: class <- "DOWN" ## regarding DISEASE
|
400: class <- "UP" ## regarding DISEASE
|
403: class <- "UP"
|
405: class <- "DOWN"
|
407: class <- 0
|
411: result <- data.frame(pvalue, class, stat,stringsAsFactors=FALSE)
|
427: #' @return \code{do_pca} returns a list with class \code{princomp}.
|
77: stop("Only SummarizedExperiment or matrix classes accepted as data")
|
288: stop("Only SummarizedExperiment or matrix classes accepted as data")
|
443: stop("Only SummarizedExperiment or matrix classes accepted as data")
|
469: stop("Only SummarizedExperiment or matrix classes accepted as data")
|
interactiveDisplay:R/ExpressionSet.R: [ ] |
---|
9: shiny::tags$input(id = inputId1, class = "color", value = "EDF8B1",
|
16: shiny::tags$input(id = inputId2, class = "color", value = "7FCDBB",
|
23: shiny::tags$input(id = inputId3, class = "color", value = "2C7FB8",
|
252: if(class(pkg)=="ChipDb"){
|
285: if(class(pkg)=="ChipDb"){
|
483: "<div id=\"net\" class=\"shiny-network-output\"><svg /></div>",
|
554: # Distance Matrix
|
QUBIC:src/matrix.h: [ ] |
---|
7: template<typename T> class Matrix {
|
12: Matrix(std::size_t reserved_count) {
|
HDF5Array:R/H5SparseMatrixSeed-class.R: [ ] |
---|
280: ans_class <- "CSC_H5SparseMatrixSeed"
|
660: .from_CSC_H5SparseMatrixSeed_to_dgCMatrix <- function(from)
|
676: .from_CSR_H5SparseMatrixSeed_to_dgCMatrix <- function(from)
|
61: t.CSC_H5SparseMatrixSeed <- function(x)
|
70: t.CSR_H5SparseMatrixSeed <- function(x)
|
258: H5SparseMatrixSeed <- function(filepath, group, subdata=NULL)
|
486: .extract_array_from_H5SparseMatrixSeed <- function(x, index)
|
530: .extract_sparse_array_from_H5SparseMatrixSeed <- function(x, index)
|
553: .read_sparse_block_from_H5SparseMatrixSeed <- function(x, viewport)
|
64: class(x) <- "CSR_H5SparseMatrixSeed"
|
73: class(x) <- "CSC_H5SparseMatrixSeed"
|
95: stop(wmsg("changing the path of a ", class(object), " object ",
|
149: ## We pass 'shape' thru as.vector() to drop its class attribute in case
|
286: ans_class <- "CSR_H5SparseMatrixSeed"
|
300: new2(ans_class, filepath=filepath, group=group,
|
6: setClass("H5SparseMatrixSeed",
|
52: setClass("CSC_H5SparseMatrixSeed", contains="H5SparseMatrixSeed")
|
53: setClass("CSR_H5SparseMatrixSeed", contains="H5SparseMatrixSeed")
|
209: msg2 <- c("H5ADMatrix() constructor if you are trying ",
|
657: ### Coercion to dgCMatrix
|
665: sparseMatrix(i=row_indices, p=indptr, x=data, dims=dim(from),
|
669: setAs("CSC_H5SparseMatrixSeed", "dgCMatrix",
|
670: .from_CSC_H5SparseMatrixSeed_to_dgCMatrix
|
672: setAs("CSC_H5SparseMatrixSeed", "sparseMatrix",
|
673: .from_CSC_H5SparseMatrixSeed_to_dgCMatrix
|
681: sparseMatrix(j=col_indices, p=indptr, x=data, dims=dim(from),
|
685: setAs("CSR_H5SparseMatrixSeed", "dgCMatrix",
|
686: .from_CSR_H5SparseMatrixSeed_to_dgCMatrix
|
688: setAs("CSR_H5SparseMatrixSeed", "sparseMatrix",
|
689: .from_CSR_H5SparseMatrixSeed_to_dgCMatrix
|
2: ### H5SparseMatrixSeed objects
|
33: ## ------------- populated by specialized subclasses -------------
|
60: ### S3/S4 combo for t.CSC_H5SparseMatrixSeed
|
67: setMethod("t", "CSC_H5SparseMatrixSeed", t.CSC_H5SparseMatrixSeed)
|
69: ### S3/S4 combo for t.CSR_H5SparseMatrixSeed
|
76: setMethod("t", "CSR_H5SparseMatrixSeed", t.CSR_H5SparseMatrixSeed)
|
84: setMethod("path", "H5SparseMatrixSeed", function(object) object@filepath)
|
88: setReplaceMethod("path", "H5SparseMatrixSeed",
|
108: setMethod("dim", "H5SparseMatrixSeed", function(x) x@dim)
|
110: setMethod("dimnames", "H5SparseMatrixSeed",
|
256: ### Returns an H5SparseMatrixSeed derivative (can be either a
|
257: ### CSC_H5SparseMatrixSeed or CSR_H5SparseMatrixSeed object).
|
369: ### H5SparseMatrixSeed objects.
|
465: setMethod(".load_sparse_data", "CSC_H5SparseMatrixSeed",
|
473: setMethod(".load_sparse_data", "CSR_H5SparseMatrixSeed",
|
499: setMethod("extract_array", "H5SparseMatrixSeed",
|
500: .extract_array_from_H5SparseMatrixSeed
|
509: setMethod("chunkdim", "CSC_H5SparseMatrixSeed", function(x) c(nrow(x), 1L))
|
511: setMethod("chunkdim", "CSR_H5SparseMatrixSeed", function(x) c(1L, ncol(x)))
|
518: setMethod("sparsity", "H5SparseMatrixSeed",
|
528: setMethod("is_sparse", "H5SparseMatrixSeed", function(x) TRUE)
|
536: setMethod("extract_sparse_array", "H5SparseMatrixSeed",
|
537: .extract_sparse_array_from_H5SparseMatrixSeed
|
541: ### work just fine on an H5SparseMatrixSeed derivative (thanks to the
|
542: ### extract_sparse_array() method for H5SparseMatrixSeed objects defined
|
548: ### extract_sparse_array() method for H5SparseMatrixSeed objects would
|
557: ## Unlike the extract_sparse_array() method for H5SparseMatrixSeed
|
563: setMethod("read_sparse_block", "H5SparseMatrixSeed",
|
564: .read_sparse_block_from_H5SparseMatrixSeed
|
631: setMethod("extractNonzeroDataByCol", "CSC_H5SparseMatrixSeed",
|
646: setMethod("extractNonzeroDataByRow", "CSR_H5SparseMatrixSeed",
|
697: setMethod("show", "H5SparseMatrixSeed",
|
GenomicTuples:R/GTuples-class.R: [ ] |
---|
280: ans_class <- class(x[[1L]])
|
252: ### From GenomicRanges-class.R "For an object with a pure S4 slot
|
292: new(ans_class,
|
314: # NOTE: "c" will error if there is no common class, e.g.
|
318: # stop("Cannot combine ", paste0(unique(sapply(args, class)),
|
324: paste0(unique(vapply(args, class, character(1L))),
|
328: # "c" silently coerces to lowest common class, e.g., c(1, "next")
|
331: # if (!all(sapply(args, class) == class(args[[1]]))) {
|
333: # paste0("Not all elements are same class: ",
|
334: # paste0(unique(sapply(args, class)),
|
337: # "class: ",
|
454: stop("Cannot compute IPD from an empty '", class(x), "'.")
|
480: # (copied from GenomicRanges/GenomicRanges-class.R).
|
500: stop("replacement value must be a '", class(x), "' object")
|
647: cat(class(x), " object with ", lx, " x ",
|
653: cat(class(x), " with 0 tuples and 0 metadata columns:\n", sep = "")
|
9: setClass("GTuples",
|
253: ### representation, these both map to initialize. Reference classes will want
|
635: # the print.classinfo argument.
|
638: showGTuples <- function(x, margin = "", print.classinfo = FALSE,
|
640: if (!identical(print.classinfo, FALSE)) {
|
641: stop("'print.classinfo' not implemented")
|
6: setClassUnion(name = "matrixOrNULL", members = c("matrix", "NULL"))
|
270: #' @importClassesFrom S4Vectors DataFrame
|
637: #' @importFrom S4Vectors makePrettyMatrixForCompactPrinting
|
656: out <- makePrettyMatrixForCompactPrinting(x, .makeNakedMatFromGTuples)
|
GenomicRanges:R/GenomicRanges-class.R: [ ] |
---|
664: .COL2CLASS <- c(
|
671: classinfo <- makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
|
6: ### TODO: The 'constraint' slot could be moved to the Vector class (or to the
|
7: ### Annotated class) so any Vector object could be constrained.
|
116: msg <- c(class(x), " object contains ", length(idx), " out-of-bound ",
|
134: ### class(ranges(x) == "IRanges")) instead of just an IRanges *object* (i.e.
|
155: if (!(class(ranges(x)) %in% c("IRanges", "StitchedIPos", "UnstitchedIPos")))
|
351: if (class(value) != "IRanges")
|
384: class(x), " objects"))
|
511: ### (d) 'class(ans)' is 'relistToClass(x[[1]])' e.g. CompressedRleList if
|
582: stop(wmsg(class(x), " objects don't support [[, as.list(), ",
|
670: .COL2CLASS <- c(.COL2CLASS, getSlots(class(x))[extra_col_names])
|
708: class(x), " object"))
|
8: setClass("GenomicRanges",
|
27: setClass("GenomicPos",
|
454: ### initialize. Reference classes will want to override 'update'. Other
|
651: print.classinfo=FALSE, print.seqinfo=FALSE,
|
663: if (print.classinfo) {
|
673: stopifnot(identical(colnames(classinfo), colnames(out)))
|
674: out <- rbind(classinfo, out)
|
690: show_GenomicRanges(object, print.classinfo=TRUE, print.seqinfo=TRUE)
|
21: setClassUnion("GenomicRanges_OR_missing", c("GenomicRanges", "missing"))
|
48: ### Extra column slots (added by GRanges subclasses)
|
50: ### The "extra column slots" are parallel slots added by GRanges subclasses
|
640: setMethod("makeNakedCharacterMatrixForDisplay", "GenomicRanges",
|
655: ## makePrettyMatrixForCompactPrinting() assumes that head() and tail()
|
662: out <- makePrettyMatrixForCompactPrinting(xx)
|
GenomicAlignments:R/GAlignmentPairs-class.R: [ ] |
---|
700: .PAIR_COL2CLASS <- c(
|
704: .HALVES_COL2CLASS <- c(
|
707: .COL2CLASS <- c(.PAIR_COL2CLASS,
|
23: ### Combine the new "parallel slots" with those of the parent class. Make
|
24: ### sure to put the new parallel slots **first**. See R/Vector-class.R file
|
53: ### x[i] - GAlignmentPairs object of the same class as 'x'
|
335: ### GAlignmentPairs class is changed to derive from CompressedList.
|
355: ### class is changed to derive from CompressedList.
|
691: cat(class(x), " object with ",
|
709: .HALVES_COL2CLASS,
|
711: .HALVES_COL2CLASS)
|
713: S4Vectors:::makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
|
7: setClass("GAlignmentPairs",
|
686: print.classinfo=FALSE,
|
699: if (print.classinfo) {
|
712: classinfo <-
|
715: stopifnot(identical(colnames(classinfo), colnames(out)))
|
716: out <- rbind(classinfo, out)
|
733: print.classinfo=TRUE, print.seqinfo=TRUE)
|
697: out <- S4Vectors:::makePrettyMatrixForCompactPrinting(x,
|
S4Vectors:R/DataFrame-class.R: [ ] |
---|
891: to_class <- class(to)
|
953: make_class_info_for_DataFrame_display <- function(x)
|
20: ## class, as well as some of its methods e.g. names(), as.list() and lapply().
|
58: ## class attribute.
|
59: if (class(object) == "DataFrame") {
|
62: ## change of the internals, only a change of the class attribute.
|
64: message("[updateObject] Setting class attribute of DataFrame ",
|
66: class(object) <- class(new("DFrame"))
|
71: message("[updateObject] ", class(object), " object ",
|
210: "Note that starting with BioC 3.10, the class attribute ",
|
219: ## class() is broken when used within a validity method. See:
|
221: #if (class(x) == "DataFrame")
|
319: stop("cannot coerce class \"", class(var)[1L], "\" to a DataFrame")
|
498: if (class(x)[[1L]] == "DataFrame")
|
713: hasNonDefaultMethod(droplevels, class(xi)[1L]) ||
|
714: hasS3Method("droplevels", class(xi))
|
779: col <- I(col) # set AsIs class to protect column
|
782: df[[1L]] <- unclass(df[[1L]]) # drop AsIs class
|
812: class(from) <- NULL
|
837: class(from) <- "table"
|
892: if (class(from) == "list") {
|
896: if (is(ans, to_class))
|
898: ans <- as(ans, to_class, strict=FALSE)
|
899: ## Even though coercion from DataFrame to 'class(to)' "worked", it
|
916: if (is(from, to_class))
|
918: ans <- as(from, to_class, strict=FALSE)
|
920: stop(wmsg("coercion of ", class(from), " object to ", to_class,
|
941: function(x) if (class(x) == "DFrame") "DataFrame" else class(x)
|
984: m <- rbind(make_class_info_for_DataFrame_display(x), m)
|
993: if (class(object) == "DataFrame") {
|
9: setClass("DataFrame",
|
18: ## DFrame is a concrete DataFrame subclass for representation of in-memory
|
24: setClass("DFrame",
|
305: if (is(listData[[1L]], getClass("Annotated")))
|
810: ### But unclass() causes deep copy
|
834: setOldClass(c("xtabs", "table"))
|
905: ## DataFrame to a DataFrame subclass is that it will set the
|
940: setMethod("classNameForDisplay", "DFrame",
|
955: vapply(x, function(xi) paste0("<", classNameForDisplay(xi), ">"),
|
965: cat(classNameForDisplay(x), " with ",
|
944: setMethod("makeNakedCharacterMatrixForDisplay", "DataFrame",
|
973: m <- makeNakedCharacterMatrixForDisplay(x)
|
977: m <- rbind(makeNakedCharacterMatrixForDisplay(head(x, nhead)),
|
979: makeNakedCharacterMatrixForDisplay(tail(x, ntail)))
|
IRanges:R/IPos-class.R: [ ] |
---|
495: object_class <- classNameForDisplay(object)
|
534: .COL2CLASS <- c(pos="integer")
|
535: classinfo <- makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
|
15: ### Combine the new "parallel slots" with those of the parent class. Make
|
16: ### sure to put the new parallel slots **first**. See R/Vector-class.R file
|
30: ### Combine the new "parallel slots" with those of the parent class. Make
|
31: ### sure to put the new parallel slots **first**. See R/Vector-class.R file
|
52: "Starting with BioC 3.10, the class attribute of all ",
|
60: if (class(x) == "IPos")
|
110: if (class(object) != "IPos")
|
121: message("[updateObject] ", class(object), " object is current.\n",
|
127: message("[updateObject] ", class(object), " object ",
|
132: if (class(object) == "UnstitchedIPos") {
|
379: stop(wmsg("all the ranges in the ", class(from), " object to ",
|
499: paste0(object_class, " object with ", object_len, " ",
|
522: stop(c(wmsg("This ", class(x), " object uses internal representation ",
|
7: setClass("IPos",
|
23: setClass("UnstitchedIPos",
|
38: setClass("StitchedIPos",
|
518: show_IPos <- function(x, margin="", print.classinfo=FALSE)
|
533: if (print.classinfo) {
|
537: stopifnot(identical(colnames(classinfo), colnames(out)))
|
538: out <- rbind(classinfo, out)
|
549: function(object) show_IPos(object, print.classinfo=TRUE)
|
514: setMethod("makeNakedCharacterMatrixForDisplay", "IPos",
|
529: ## makePrettyMatrixForCompactPrinting() assumes that head() and tail()
|
532: out <- makePrettyMatrixForCompactPrinting(xx)
|
BSgenome:R/BSgenomeViews-class.R: [ ] |
---|
164: .COL2CLASS <- c(
|
5: ### The BSgenomeViews class is a container for storing a set of genomic
|
13: ### TODO: A cleaner class design would be to have 2 abstractions: IViews and
|
15: ### IRanges object. Note that this is how the current Views class is defined.
|
18: ### more general Views class that contains List and has a subject slot.
|
156: cat(class(x), " object with ",
|
171: S4Vectors:::makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
|
11: ### reasons that we didn't make GRanges a subclass of IRanges.
|
19: ### BSgenomeViews below then should become a subclass of GViews.
|
21: setClass("BSgenomeViews",
|
151: print.classinfo=FALSE,
|
163: if (print.classinfo) {
|
170: classinfo <-
|
173: stopifnot(identical(colnames(classinfo), colnames(out)))
|
174: out <- rbind(classinfo, out)
|
191: print.classinfo=TRUE, print.seqinfo=TRUE)
|
388: #setMethod("consensusMatrix", "BSgenomeViews",
|
396: setMethod("consensusMatrix", "BSgenomeViews",
|
17: ### GRanges object. Both IViews and GViews would be direct subclasses of a
|
161: out <- S4Vectors:::makePrettyMatrixForCompactPrinting(x,
|
SummarizedExperiment:R/Assays-class.R: [ ] |
---|
190: ans_class <- class(x)
|
207: ans_class <- class(x)
|
13: ### - Matrix-like methods: dim, [, [<-, rbind, cbind
|
46: ### Assays class
|
192: as(callGeneric(), ans_class)
|
209: ans <- as(callGeneric(), ans_class)
|
241: as(endoapply(assays, extract_assay_subset), class(x))
|
264: as(mendoapply(replace_assay_subset, assays, values), class(x))
|
314: as(SimpleList(res), class(getListElement(objects, 1L)))
|
333: ### Having "arbind" and "acbind" methods for Matrix objects will make rbind()
|
334: ### and cbind() work on Assays objects with Matrix list elements.
|
337: ### to make IRanges depend on the Matrix package.
|
338: setMethod("arbind", "Matrix", function(...) rbind(...))
|
339: setMethod("acbind", "Matrix", function(...) cbind(...))
|
343: ### SimpleAssays class
|
365: ### ShallowSimpleListAssays class
|
394: ### AssaysInEnv class
|
418: value <- S4Vectors:::normarg_names(value, class(x), length(x))
|
15: ### An Assays concrete subclass needs to implement (b) (required) plus
|
49: setClass("Assays", contains="RectangularData", representation("VIRTUAL"))
|
350: setClass("SimpleAssays",
|
367: ### WARNING: Looks like reference classes as implemented in the methods
|
377: .ShallowData <- setRefClass("ShallowData",
|
380: .ShallowSimpleListAssays0 <- setRefClass("ShallowSimpleListAssays",
|
403: setClass("AssaysInEnv",
|
GenomicAlignments:R/OverlapEncodings-class.R: [ ] |
---|
242: x_class <- class(x)
|
253: .COL2CLASS <- c(
|
259: classinfo <- S4Vectors:::makeClassinfoRowForCompactPrinting(x,
|
22: ### Combine the new "parallel slots" with those of the parent class. Make
|
23: ### sure to put the new parallel slots **first**. See R/Vector-class.R file
|
260: .COL2CLASS)
|
7: setClass("OverlapEncodings",
|
240: showOverlapEncodings <- function(x, margin="", print.classinfo=FALSE)
|
246: cat(classNameForDisplay(x), " object of length ", x_len,
|
252: if (print.classinfo) {
|
262: stopifnot(identical(colnames(classinfo), colnames(out)))
|
263: out <- rbind(classinfo, out)
|
275: showOverlapEncodings(object, margin=" ", print.classinfo=TRUE)
|
250: out <- S4Vectors:::makePrettyMatrixForCompactPrinting(x,
|
scClassify:R/train_scClassify.R: [ ] |
---|
437: class_tmp <- currentClass(cellTypes, cutree_list[[i]])
|
412: currentClass <- function(cellTypes, cutree_res){
|
442: trainClass <- class_tmp[trainIdx]
|
47: train_scClassify <- function(exprsMat_train,
|
176: trainClassList <- list()
|
212: train_scClassifySingle <- function(exprsMat_train,
|
20: #' @param BPPARAM A \code{BiocParallelParam} class object
|
23: #' @param returnList A logical input indicates whether the output will be class of list
|
274: Matrix::rowMeans(as.matrix(exprsMat_train[de, cellTypes_train == x]))))
|
438: names(class_tmp) <- colnames(exprsMat)
|
452: model[[j]] <- list(train = Matrix::t(exprsMat[na.omit(hvg[[j]]),
|
33: #' trainClass <- train_scClassify(exprsMat_train = exprsMat_xin_subset,
|
108: if (any(c("matrix", "dgCMatrix") %in% is(exprsMat_train))) {
|
443: if (length(unique(trainClass)) != 1) {
|
446: trainClass,
|
455: y = as.factor(trainClass))
|
1: #' Training scClassify model
|
24: #' @param ... Other input for predict_scClassify for the case when weights calculation
|
26: #' @return list of results or an object of \code{scClassifyTrainModel}
|
30: #' data("scClassify_example")
|
31: #' xin_cellTypes <- scClassify_example$xin_cellTypes
|
32: #' exprsMat_xin_subset <- scClassify_example$exprsMat_xin_subset
|
130: ### train_scClassify
|
134: trainRes[[train_list_idx]] <- train_scClassifySingle(exprsMat_train[[train_list_idx]],
|
150: trainRes <- train_scClassifySingle(exprsMat_train,
|
178: trainClassList[[train_list_idx]] <- .scClassifyTrainModel(
|
188: trainClassList <- scClassifyTrainModelList(trainClassList)
|
190: trainClassList <- .scClassifyTrainModel(
|
200: return(trainClassList)
|
242: (scClassify requires a log-transformed normalised input)")
|
343: selfTrainRes <- predict_scClassify(exprsMat_test = exprsMat_train,
|
rhdf5client:inst/bad/HSDS_Matrix.R: [ ] |
---|
41: HSDS_Matrix = function(url, path, title) {
|
16: HSDS_Matrix_OLD = function(url, path) {
|
6: #' This class is deprecated and will be defunct in the next release.
|
13: #' HSDS_Matrix
|
30: #' This class is deprecated and will be defunct in the next release.
|
38: #' HSDS_Matrix(URL_hsds(), "/shared/bioconductor/darmgcls.h5")
|
4: #' simplify construction of DelayedMatrix from url and path in HSDS
|
28: #' simplify construction of DelayedMatrix from url and path in HSDS
|
IRanges:R/IPosRanges-class.R: [ ] |
---|
122: object_class <- classNameForDisplay(object)
|
159: .COL2CLASS <- c(
|
164: classinfo <- makeClassinfoRowForCompactPrinting(x, .COL2CLASS)
|
38: target <- new(class(object))@elementType
|
43: class(object), " object is current.\n",
|
47: message("[updateObject] elementType slot of ", class(object),
|
126: paste0(object_class, " object with ", object_len, " ",
|
193: stop(wmsg(class(x), " objects don't support [[, as.list(), ",
|
12: setClass("IPosRanges",
|
147: show_IPosRanges <- function(x, margin="", print.classinfo=FALSE)
|
158: if (print.classinfo) {
|
166: stopifnot(identical(colnames(classinfo), colnames(out)))
|
167: out <- rbind(classinfo, out)
|
178: function(object) show_IPosRanges(object, print.classinfo=TRUE)
|
8: ### The direct IPosRanges subclasses defined in the IRanges package are:
|
143: setMethod("makeNakedCharacterMatrixForDisplay", "IPosRanges",
|
150: ## makePrettyMatrixForCompactPrinting() assumes that 'x' is subsettable
|
157: out <- makePrettyMatrixForCompactPrinting(x)
|
EnMCB:R/utils.R: [ ] |
---|
779: class.vector <- as.factor(class_vector)
|
51: removeobjectclass<- function(x){
|
827: buildIncidenceMatrix<-function (gene.ids, annotation)
|
42: class(x) <- c("ridgemat", class(x))
|
47: class(x) <- c("mcb.coxph.penal", class(x))
|
52: class(x) <- setdiff(class(x),"mcb.coxph.penal")
|
488: if (class(ensemble_model$stacking)[1] == "cv.glmnet")
|
490: else if (class(ensemble_model$stacking)[1] == "cph")
|
728: #error metrics -- Confusion Matrix
|
772: findAttractors<-function (methylation_matrix, annotation, class_vector,
|
787: new.order <- order(class.vector, colnames(dat.detect.w))
|
789: class.vector <- class.vector[new.order]
|
803: }, x = class.vector)
|
809: }, x = class.vector)
|
82: object = removeobjectclass(object)
|
784: incidence.matrix <- buildIncidenceMatrix(rownames(dat.detect.w), annotation)
|
canceR:R/GSEA.1.0.R: [ ] |
---|
65: class.labels1 <- matrix(0, nrow=Ns, ncol=nperm)
|
66: class.labels2 <- matrix(0, nrow=Ns, ncol=nperm)
|
85: class1.size <- length(C[[1]])
|
86: class2.size <- length(C[[2]])
|
87: class1.index <- seq(1, class1.size, 1)
|
88: class2.index <- seq(class1.size + 1, class1.size + class2.size, 1)
|
91: class1.subset <- sample(class1.index, size = ceiling(class1.size*fraction), replace = replace)
|
92: class2.subset <- sample(class2.index, size = ceiling(class2.size*fraction), replace = replace)
|
93: class1.subset.size <- length(class1.subset)
|
94: class2.subset.size <- length(class2.subset)
|
134: class1.label1.subset <- sample(class1.subset, size = ceiling(class1.subset.size*fraction.class1))
|
135: class2.label1.subset <- sample(class2.subset, size = floor(class2.subset.size*fraction.class1))
|
500: class1.size <- length(C[[1]])
|
501: class2.size <- length(C[[2]])
|
612: class.list <- unlist(strsplit(cls.cont[[3]], " "))
|
618: class.v <- vector(length=s, mode="numeric")
|
995: class.labels <- CLS$class.v
|
996: class.phen <- CLS$phen
|
63: reshuffled.class.labels1 <- matrix(0, nrow=Ns, ncol=nperm)
|
64: reshuffled.class.labels2 <- matrix(0, nrow=Ns, ncol=nperm)
|
95: subset.class1 <- rep(0, class1.size)
|
101: subset.class2 <- rep(0, class2.size)
|
108: fraction.class1 <- class1.size/Ns
|
109: fraction.class2 <- class2.size/Ns
|
16: GSEA.GeneRanking <- function(A, class.labels, gene.labels, nperm, permutation.type = 0, sigma.correction = "GeneCluster", fraction=1.0, r...(38 bytes skipped)...
|
31: # A: Matrix of gene expression values (rows are genes, columns are samples)
|
32: # class.labels: Phenotype of class disticntion of interest. A vector of binary labels having first the 1's and then the 0's
|
42: # s2n.matrix: Matrix with random permuted or bootstraps signal to noise ratios (rows are genes, columns are permutations...(26 bytes skipped)...
|
43: # obs.s2n.matrix: Matrix with observed signal to noise ratios (rows are genes, columns are boostraps subsamplings. If fracti...(58 bytes skipped)...
|
44: # order.matrix: Matrix with the orderings that will sort the columns of the obs.s2n.matrix in decreasing s2n order
|
45: # obs.order.matrix: Matrix with the orderings that will sort the columns of the s2n.matrix in decreasing s2n order
|
84: C <- split(class.labels, class.labels)
|
96: for (i in 1:class1.size) {
|
97: if (is.element(class1.index[i], class1.subset)) {
|
98: subset.class1[i] <- 1
|
102: for (i in 1:class2.size) {
|
103: if (is.element(class2.index[i], class2.subset)) {
|
104: subset.class2[i] <- 1
|
107: subset.mask[, r] <- as.numeric(c(subset.class1, subset.class2))
|
112: full.subset <- c(class1.subset, class2.subset)
|
113: label1.subset <- sample(full.subset, size = Ns * fraction.class1)
|
114: reshuffled.class.labels1[, r] <- rep(0, Ns)
|
115: reshuffled.class.labels2[, r] <- rep(0, Ns)
|
116: class.labels1[, r] <- rep(0, Ns)
|
117: class.labels2[, r] <- rep(0, Ns)
|
121: reshuffled.class.labels1[i, r] <- m1
|
122: reshuffled.class.labels2[i, r] <- m2 - m1
|
123: if (i <= class1.size) {
|
124: class.labels1[i, r] <- m2
|
125: class.labels2[i, r] <- 0
|
127: class.labels1[i, r] <- 0
|
128: class.labels2[i, r] <- m2
|
136: reshuffled.class.labels1[, r] <- rep(0, Ns)
|
137: reshuffled.class.labels2[, r] <- rep(0, Ns)
|
138: class.labels1[, r] <- rep(0, Ns)
|
139: class.labels2[, r] <- rep(0, Ns)
|
141: if (i <= class1.size) {
|
142: m1 <- sum(!is.na(match(class1.label1.subset, i)))
|
143: m2 <- sum(!is.na(match(class1.subset, i)))
|
144: reshuffled.class.labels1[i, r] <- m1
|
145: reshuffled.class.labels2[i, r] <- m2 - m1
|
146: class.labels1[i, r] <- m2
|
147: class.labels2[i, r] <- 0
|
149: m1 <- sum(!is.na(match(class2.label1.subset, i)))
|
150: m2 <- sum(!is.na(match(class2.subset, i)))
|
151: reshuffled.class.labels1[i, r] <- m1
|
152: reshuffled.class.labels2[i, r] <- m2 - m1
|
153: class.labels1[i, r] <- 0
|
154: class.labels2[i, r] <- m2
|
162: P <- reshuffled.class.labels1 * subset.mask
|
172: P <- reshuffled.class.labels2 * subset.mask
|
213: P <- class.labels1 * subset.mask
|
223: P <- class.labels2 * subset.mask
|
475: ...(159 bytes skipped)...", "#FF0D1D", "#FF0000") # blue-pinkogram colors. The first and last are the colors to indicate the class vector (phenotype). This is the 1998-vintage, pre-gene cluster, original pinkogram color map
|
491: row.names <- c(row.names[seq(n.rows, 1, -1)], "Class")
|
502: axis(3, at=c(floor(class1.size/2),class1.size + floor(class2.size/2)), labels=col.classes, tick=FALSE, las = 1, cex.axis=1.25, font.axis=2, line=-1)
|
598: # Reads a class vector CLS file and defines phenotype and class labels vectors for the samples in a gene expression file (RES or GCT format)
|
613: s <- length(class.list)
|
614: t <- table(class.list)
|
625: if (class.list[i] == phen[j]) {
|
626: class.v[i] <- phen.label[j]
|
630: return(list(phen = phen, class.v = class.v))
|
795: # input.cls: Input class vector (phenotype) file in CLS format
|
988: # Read input class vector
|
999: phen1 <- class.phen[2]
|
1000: phen2 <- class.phen[1]
|
1002: phen1 <- class.phen[1]
|
1003: phen2 <- class.phen[2]
|
1008: col.index <- order(class.labels, decreasing= FALSE)
|
1009: class.labels <- class.labels[col.index]
|
1166: O <- GSEA.GeneRanking(A, class.labels, gene.labels, call.nperm, permutation.type = perm.type, sigma.correction = "GeneCluster", fr...(62 bytes skipped)...
|
1831: GSEA.HeatMapPlot(V = C, col.labels = class.labels, col.classes = class.phen, main = "Heat Map for Genes in Dataset")
|
2032: GSEA.HeatMapPlot(V = pinko, row.names = pinko.gene.names, col.labels = class.labels, col.classes = class.phen, col.names = sample.names, main =" Heat Map for Genes in Gene Set", xlab=" ", ylab=" ")
|
446: GSEA.HeatMapPlot <- function(V, row.names = FALSE, col.labels, col.classes, col.names = FALSE, main = " ", xlab=" ", ylab=" ") {
|
GeneGeneInteR:R/PLSPM.R: [ ] |
---|
859: mvs_class = vapply(MV, class,FUN.value="character")
|
964: mvs_class = vapply(DF, class,FUN.VALUE="character")
|
975: mvs_class = vapply(MV, class,FUN.VALUE="character")
|
60: class(res) <- "GGItest"
|
69: class(res) <- "GGItest"
|
111: # class(res) <- "GGItest"
|
129: class(res) <- "htest"
|
281: class(res) = "plspm"
|
860: mvs_as_factors <- mvs_class == "factor"
|
965: mvs_as_factors <- mvs_class == "factor"
|
976: mvs_as_factors <- mvs_class == "factor"
|
14: } else if(!is(G1,"SnpMatrix")){
|
15: stop("G1 must be a SnpMatrix object.")
|
16: } else if(!is(G2,"SnpMatrix")){
|
17: stop("G2 must be a SnpMatrix object")
|
21: stop("Y and both SnpMatrix objects must contain the same number of individuals.")
|
23: stop("The snpMatrix must be complete. No NAs are allowed.")
|
25: stop("The snpMatrix must be complete. No NAs are allowed.")
|
MIGSA:R/MGSZ.R: [ ] |
---|
437: ev.p.val.class <- rep(0, length(realES))
|
440: ev.param.class <- ismev::gum.fit(as.vector(permESs[, k]),
|
443: logEVcdf(realES[[k]], ev.param.class)
|
239: mGszEbayes <- function(exprMatrix, fit_options) {
|
241: design <- designMatrix(fit_options)
|
243: fit1 <- lmFit(exprMatrix, design)
|
253: voomLimaRank <- function(exprMatrix, fit_options) {
|
255: design <- designMatrix(fit_options)
|
257: newExpr <- voom(exprMatrix, design)
|
309: bplapply(seq_len(nPerm), function(i, designMatrix) {
|
311: permDesign <- designMatrix(fitOptions)[perms[i, ], ]
|
317: }, designMatrix = designMatrix)
|
73: #' @importClassesFrom edgeR DGEList
|
kebabs:src/svm.cpp: [ ] |
---|
1595: static void solve_one_class(
|
2570: int svm_get_nr_class(const svm_model *model)
|
201: class QMatrix {
|
206: virtual ~QMatrix() {}
|
1381: class ONE_CLASS_Q: public Kernel
|
1384: ONE_CLASS_Q(const svm_problem& prob, const svm_parameter& param)
|
1417: ~ONE_CLASS_Q()
|
1894: static void multiclass_probability(int k, double **r, double *p)
|
2089: static void svm_group_classes(const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
|
18: template <class T> static inline T min(T x,T y) { return (x<y)?x:y; }
|
21: template <class T> static inline T max(T x,T y) { return (x>y)?x:y; }
|
23: template <class T> static inline void swap(T& x, T& y) { T t=x; x=y; y=t; }
|
24: template <class S, class T> static inline void clone(T*& dst, S* src, int n)
|
74: class Cache
|
199: // the member function get_Q is for getting one column from the Q Matrix
|
209: class Kernel: public QMatrix {
|
458: class Solver {
|
1074: class Solver_NU: public Solver
|
1331: class SVC_Q: public Kernel
|
1427: class SVR_Q: public Kernel
|
1620: s.Solve(l, ONE_CLASS_Q(*prob,*param), zeros, ones,
|
1726: case ONE_CLASS:
|
1727: solve_one_class(prob,param,alpha,&si);
|
1873: info("Line search fails in two-class probability estimates\n");
|
1879: info("Reaching maximal iterations in two-class probability estimates\n");
|
2087: // label: label name, start: begin of each class, count: #data of classes, perm: indices to the original data
|
2092: int max_nr_class = 16;
|
2093: int nr_class = 0;
|
2094: int *label = Malloc(int,max_nr_class);
|
2095: int *count = Malloc(int,max_nr_class);
|
2103: for(j=0;j<nr_class;j++)
|
2112: if(j == nr_class)
|
2114: if(nr_class == max_nr_class)
|
2116: max_nr_class *= 2;
|
2117: label = (int *)realloc(label,max_nr_class*sizeof(int));
|
2118: count = (int *)realloc(count,max_nr_class*sizeof(int));
|
2120: label[nr_class] = this_label;
|
2121: count[nr_class] = 1;
|
2122: ++nr_class;
|
2128: // However, for two-class sets with -1/+1 labels and -1 appears first,
|
2131: if (nr_class == 2 && label[0] == -1 && label[1] == 1)
|
2144: int *start = Malloc(int,nr_class);
|
2146: for(i=1;i<nr_class;i++)
|
2154: for(i=1;i<nr_class;i++)
|
2157: *nr_class_ret = nr_class;
|
2173: if(param->svm_type == ONE_CLASS ||
|
2177: // regression or one-class-svm
|
2178: model->nr_class = 2;
|
2224: int nr_class;
|
2230: // group training data of the same class
|
2231: svm_group_classes(prob,&nr_class,&label,&start,&count,perm);
|
2232: if(nr_class == 1)
|
2233: info("WARNING: training data in only one class. See README for details.\n");
|
2246: double *weighted_C = Malloc(double, nr_class);
|
2247: for(i=0;i<nr_class;i++)
|
2252: for(j=0;j<nr_class;j++)
|
2255: if(j == nr_class)
|
2256: REprintf("WARNING: class label %d specified in weight is not found\n", param->weight_label[i]);
|
2266: decision_function *f = Malloc(decision_function,nr_class*(nr_class-1)/2);
|
2271: probA=Malloc(double,nr_class*(nr_class-1)/2);
|
2272: probB=Malloc(double,nr_class*(nr_class-1)/2);
|
2276: for(i=0;i<nr_class;i++)
|
2277: for(int j=i+1;j<nr_class;j++)
|
2318: model->nr_class = nr_class;
|
2320: model->label = Malloc(int,nr_class);
|
2321: for(i=0;i<nr_class;i++)
|
2324: model->rho = Malloc(double,nr_class*(nr_class-1)/2);
|
2325: for(i=0;i<nr_class*(nr_class-1)/2;i++)
|
2330: model->probA = Malloc(double,nr_class*(nr_class-1)/2);
|
2331: model->probB = Malloc(double,nr_class*(nr_class-1)/2);
|
2332: for(i=0;i<nr_class*(nr_class-1)/2;i++)
|
2345: int *nz_count = Malloc(int,nr_class);
|
2346: model->nSV = Malloc(int,nr_class);
|
2347: for(i=0;i<nr_class;i++)
|
2377: int *nz_start = Malloc(int,nr_class);
|
2379: for(i=1;i<nr_class;i++)
|
2382: model->sv_coef = Malloc(double *,nr_class-1);
|
2383: for(i=0;i<nr_class-1;i++)
|
2387: for(i=0;i<nr_class;i++)
|
2388: for(int j=i+1;j<nr_class;j++)
|
2420: for(i=0;i<nr_class*(nr_class-1)/2;i++)
|
2436: int nr_class;
|
2445: // Each class to l folds -> some folds may have zero elements
|
2452: svm_group_classes(prob,&nr_class,&label,&start,&count,perm);
|
2460: for (c=0; c<nr_class; c++)
|
2469: for (c=0; c<nr_class;c++)
|
2475: for (c=0; c<nr_class;c++)
|
2539: double *prob_estimates=Malloc(double,svm_get_nr_class(submodel));
|
2572: return model->nr_class;
|
2578: for(int i=0;i<model->nr_class;i++)
|
2609: if(model->param.svm_type == ONE_CLASS ||
|
2625: if(model->param.svm_type == ONE_CLASS)
|
2632: int nr_class = model->nr_class;
|
2643: int *start = Malloc(int,nr_class);
|
2645: for(i=1;i<nr_class;i++)
|
2648: int *vote = Malloc(int,nr_class);
|
2649: for(i=0;i<nr_class;i++)
|
2653: for(i=0;i<nr_class;i++)
|
2654: for(int j=i+1;j<nr_class;j++)
|
2680: for(i=1;i<nr_class;i++)
|
2693: int nr_class = model->nr_class;
|
2695: if(model->param.svm_type == ONE_CLASS ||
|
2700: dec_values = Malloc(double, nr_class*(nr_class-1)/2);
|
2713: int nr_class = model->nr_class;
|
2714: double *dec_values = Malloc(double, nr_class*(nr_class-1)/2);
|
2718: double **pairwise_prob=Malloc(double *,nr_class);
|
2719: for(i=0;i<nr_class;i++)
|
2720: pairwise_prob[i]=Malloc(double,nr_class);
|
2722: for(i=0;i<nr_class;i++)
|
2723: for(int j=i+1;j<nr_class;j++)
|
2729: multiclass_probability(nr_class,pairwise_prob,prob_estimates);
|
2732: for(i=1;i<nr_class;i++)
|
2735: for(i=0;i<nr_class;i++)
|
2747: "c_svc","nu_svc","one_class","epsilon_svr","nu_svr",NULL
|
2777: int nr_class = model->nr_class;
|
2779: fprintf(fp, "nr_class %d\n", nr_class);
|
2784: for(int i=0;i<nr_class*(nr_class-1)/2;i++)
|
2792: for(int i=0;i<nr_class;i++)
|
2800: for(int i=0;i<nr_class*(nr_class-1)/2;i++)
|
2807: for(int i=0;i<nr_class*(nr_class-1)/2;i++)
|
2815: for(int i=0;i<nr_class;i++)
|
2830: for(int j=0;j<nr_class-1;j++)
|
2943: else if(strcmp(cmd,"nr_class")==0)
|
2944: FSCANF(fp,"%d",&model->nr_class);
|
2949: int n = model->nr_class * (model->nr_class-1)/2;
|
2956: int n = model->nr_class;
|
2963: int n = model->nr_class * (model->nr_class-1)/2;
|
2970: int n = model->nr_class * (model->nr_class-1)/2;
|
2977: int n = model->nr_class;
|
3076: int m = model->nr_class - 1;
|
3172: for(int i=0;i<model_ptr->nr_class-1;i++)
|
3224: svm_type != ONE_CLASS &&
|
3260: svm_type == ONE_CLASS ||
|
3278: svm_type == ONE_CLASS)
|
3279: return "one-class SVM probability output not supported yet";
|
3287: int max_nr_class = 16;
|
3288: int nr_class = 0;
|
3289: int *label = Malloc(int,max_nr_class);
|
3290: int *count = Malloc(int,max_nr_class);
|
3297: for(j=0;j<nr_class;j++)
|
3303: if(j == nr_class)
|
3305: if(nr_class == max_nr_class)
|
3307: max_nr_class *= 2;
|
3308: label = (int *)realloc(label,max_nr_class*sizeof(int));
|
3309: count = (int *)realloc(count,max_nr_class*sizeof(int));
|
3311: label[nr_class] = this_label;
|
3312: count[nr_class] = 1;
|
3313: ++nr_class;
|
3317: for(i=0;i<nr_class;i++)
|
3320: for(int j=i+1;j<nr_class;j++)
|
471: void Solve(int l, const QMatrix& Q, const double *p_, const schar *y_,
|
481: const QMatrix *Q;
|
569: void Solver::Solve(int l, const QMatrix& Q, const double *p_, const schar *y_,
|
1070: // Solver for nu-svm classification and regression
|
1078: void Solve(int l, const QMatrix& Q, const double *p, const schar *y,
|
1893: // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng
|
1951: info("Exceeds max_iter in multiclass_prob\n");
|
2222: // classification
|
2390: // classifier (i,j): coefficients with
|
GSgalgoR:R/galgo.R: [ ] |
---|
390: class_results <- mapply(cluster_classify, test_a, centroids,
|
392: cluster_class <- unlist(class_results)
|
129: numInClass <- table(y)
|
44: #' Galgo Object class
|
53: galgo.Obj <- setClass( # Set the name for the class
|
118: if (class(y)[1] == "Surv") {y <- y[, "time"]}
|
393: cluster_class <- cluster_class[order(as.vector(unlist(flds)))]
|
394: fit_silhouette <- mean(cluster::silhouette(cluster_class,
|
396: fit_differences <- surv_fitness(surv_obj, cluster_class, period)
|
684: # Matrix with random TRUE false with uniform distribution,
|
2: #' robust transcriptomic classifiers associated with patient outcome across
|
13: #' classification of tumors is a difficult task and the results obtained
|
131: for (i in seq_len(length(numInClass))) {
|
132: min_reps <- numInClass[i] %/% k
|
134: spares <- numInClass[i] %% k
|
139: foldVector[which(y == names(numInClass)[i])] <-
|
143: foldVector[which(y == names(numInClass)[i])] <-
|
144: sample(seq_len(k), size = numInClass[i]
|
227: #' @param clustclass a numeric vector with the group label for each patient
|
254: #' surv_fitness(OS, clustclass = clinical$grade, period = 3650)
|
255: surv_fitness <- function(OS, clustclass, period) {
|
259: RMST(survival::survfit(OS ~ clustclass), rmean = period)
|
CiteFuse:R/QCfunctions.R: [ ] |
---|
570: doubletClassify_between_class <- ifelse(!hto_cellHash_mix_label %in%
|
833: doubletClassify_within_class <- ifelse(doubletClassify_within_label ==
|
825: doubletClassify_within_label <- apply(batch_doublets_mat, 1, function(res) {
|
10: #' \code{dgCMatrix} class)
|
30: #' @importFrom Matrix rowSums
|
90: rowsums <- Matrix::rowSums(exprs)
|
164: #' @importFrom Matrix readMM sparseMatrix
|
260: exprs_mat <- Matrix::sparseMatrix(i = indices + 1,
|
272: exprs_mat <- Matrix::readMM(mat_path)
|
341: #' @importFrom Matrix rowMeans
|
457: ref <- Matrix::rowMeans(logSet)
|
489: #' @importFrom Matrix rowSums
|
519: hto_cellHash_log <- hto_cellHash_log[Matrix::rowSums(hto_cellHash_log) >
|
577: sce$doubletClassify_between_class <- doubletClassify_between_class
|
782: sce$nUMI <- Matrix::colSums(SingleCellExperiment::counts(sce))
|
838: sce$doubletClassify_within_class <- doubletClassify_within_class
|
48: "dgCMatrix" %in% methods::is(exprsMat),
|
54: if (any(!unlist(lapply(exprsMat, function(x) "dgCMatrix" %in% is(x))) &
|
62: "dgCMatrix" %in% methods::is(exprsMat))) {
|
79: if (!"dgCMatrix" %in% methods::is(exprs)) {
|
80: exprs <- methods::as(exprs, "dgCMatrix")
|
89: if ("dgCMatrix" %in% methods::is(exprsMat)) {
|
273: exprs_mat <- methods::as(exprs_mat, "dgCMatrix")
|
576: sce$doubletClassify_between_label <- hto_cellHash_mix_label
|
578: doublet_res <- list(doubletClassify_between_threshold = hto_threshold,
|
579: doubletClassify_between_resultsMat = hto_cellHash_pass)
|
676: if (!"doubletClassify_between_label" %in% colnames(colData(sce))) {
|
677: warning("Haven't performed doubletClassify() yet!")
|
692: hto_cellHash_pass <- metadata(sce)[["doubletClassify_between_resultsMat"]]
|
697: hto_threshold <- metadata(sce)[["doubletClassify_between_threshold"]]
|
799: if (!"doubletClassify_between_label" %in% colnames(colData(sce))) {
|
800: stop("Haven't performed doubletClassify_between() yet!")
|
803: hto_threshold <- metadata(sce)[["doubletClassify_between_threshold"]]
|
808: hto_cellHash_mix_label <- sce$doubletClassify_between_label
|
837: sce$doubletClassify_within_label <- doubletClassify_within_label
|
841: list(doubletClassify_within_resultsMat =
|
rCGH:R/AllHelperFunctions.R: [ ] |
---|
347: .readSNP6Matrix <- function(filePath, startAt, useProbes, verbose){
|
111: .readAgilentMatrix <- function(filePath, verbose){
|
419: .readCytoScanMatrix <- function(filePath, startAt, useProbes, verbose){
|
342: cnSet <- .readSNP6Matrix(filePath, startAt, useProbes, verbose)
|
414: cnSet <- .readCytoScanMatrix(filePath, startAt, useProbes, verbose)
|
628: K <- model$classification
|
666: K <- model$classification
|
SpeCond:R/fct_SpeCond_2.R: [ ] |
---|
387: M_col_class=M_col
|
311: classification=fit_p$classification
|
331: classification=rep(10,length(expression_values))
|
589: createParameterMatrix <- function(param.detection=NULL,beta.1=NULL,beta.2=NULL,lambda.1=NULL,lambda.2=NULL,per.1=NULL,per...(93 bytes skipped)...
|
511: M_class_col=t(sapply(1:length(specificResult$fit), function(i) changeColorClassification(specificResult$fit[[i]]$classification)))
|
385: changeColorClassification <- function(M_col){
|
930: getMatrixFromExpressionSet <- function(expSet,condition.factor=NULL,condition.method=c("mean","median","max")...(2 bytes skipped)...
|
388: M_col_class[M_col==1] <- 4
|
389: M_col_class[M_col==2] <- 3
|
390: M_col_class[M_col==3] <- "orange"
|
391: M_col_class[M_col==4] <- "purple"
|
392: M_col_class[M_col==5] <- "cyan"
|
393: M_col_class[M_col==10] <- "black"
|
394: return(M_col_class)
|
530: l=sapply(1:nrow(expressionMatrix), function(i) createSingleGeneHtmlPage(index.html.link,prefix.file,i,row.names(expressionMatrix)[i],expressionMatrix...(43 bytes skipped)...cResult$fit[[i]],specificResult$L.specific.result$specific[i],specificResult$fit[[i]]$NorMixParam,M_class_col[i,],specificResult$L.specific.result$M.specific.all[i,],specificResult$L.specific.result$L.pv[[...(98 bytes skipped)...
|
552: ...(25 bytes skipped)...e.html.ids), function(i) createSingleGeneHtmlPage(index.html.link,prefix.file,i,row.names(expressionMatrix)[gene.html.ids[i]],expressionMatrix...(103 bytes skipped)...t$L.specific.result$specific[gene.html.ids[i]],specificResult$fit[[gene.html.ids[i]]]$NorMixParam,M_class_col[gene.html.ids[i],],specificResult$L.specific.result$M.specific.all[gene.html.ids[i],],specificR...(188 bytes skipped)...
|
945: stop("condition must be of class factor")
|
223: diff_median=rbind(diff_median,c(i,j,abs(median(expression_values[which(fit2_p$classification==i)])-median(expression_values[which(fit2_p$classification==j)]))))
|
323: L_p=list(G_initial,G,NorMixParam,classification)
|
324: names(L_p)=c("G_initial","G","NorMixParam","classification")
|
332: names(classification)=colnames
|
337: classification=fit_p$classification
|
359: classification[-specific_outlier_step1]=1
|
364: classification[names(mclust2$classification)]=mclust2$classification
|
371: L_p=list(G_initial,G,NorMixParam,classification,specific_outlier_step1)
|
372: names(L_p)=c("G_initial","G","NorMixParam","classification","specific_outlier_step1")
|
470: getGeneHtmlPage <- function(expressionMatrix,specificResult,name.index.html="index.html",prefix.file=NULL, outdir="Single_result_pages",gene.htm...(30 bytes skipped)...
|
482: stop("Error you need to enter a prefix.file value or to use a specificResult attribute of classe sp_list containing a prefix.file value (object inside the SpeCond() result value or the result of ...(35 bytes skipped)...
|
491: if(nrow(expressionMatrix)<10 && !is.null(gene.html.ids)){
|
492: gene.html.ids=c(1:nrow(expressionMatrix))
|
497: p_identic_row_names=row.names(expressionMatrix)[specificResult$identic.row.ids]
|
499: gene.html=row.names(expressionMatrix)
|
502: gene.html=row.names(expressionMatrix)[gene.html.ids]
|
507: expressionMatrix=expressionMatrix[-(specificResult$identic.row.ids),]
|
508: gene.html.ids=which(rownames(expressionMatrix) %in% gene.html)
|
516: n_page=sapply(1:nrow(expressionMatrix), function(i) paste(i,"- ID ",row.names(expressionMatrix)[i],sep=""))
|
517: n_link=sapply(1:nrow(expressionMatrix), function(i) paste(prefix.file,"_",row.names(expressionMatrix)[i],".html",sep=""))
|
535: gene.html.ids=which(rownames(expressionMatrix)%in% gene.html)
|
538: n_page=sapply(1:length(gene.html.ids), function(i) paste(i,"- ID ",row.names(expressionMatrix)[gene.html.ids[i]],sep=""))
|
539: n_link=sapply(1:length(gene.html.ids), function(i) paste(prefix.file,"_",row.names(expressionMatrix)[gene.html.ids[i]],".html",sep=""))
|
558: geneLink=cbind(rownames(expressionMatrix)[gene.html.ids],n_link)
|
565: getIdenticRow <- function(expressionMatrix){
|
567: M_identic=t(sapply(1:nrow(expressionMatrix), function(i) expressionMatrix[i,]==expressionMatrix[i,1]))
|
569: identic_ids=which(M_identic_sum==ncol(expressionMatrix))
|
665: fitPrior <- function(expressionMatrix,param.detection=NULL,lambda=1,beta=6, evaluation.lambda.beta=FALSE){
|
669: identic_row_ids=getIdenticRow(expressionMatrix)
|
671: expressionMatrix=expressionMatrix[-(identic_row_ids),]
|
672: print(dim(expressionMatrix))
|
683: fit_beta_0=lapply(1:nrow(expressionMatrix), function(i) Mclust( expressionMatrix[i,], G = 1:3,modelNames = "V" ))
|
686: fit=lapply(1:nrow(expressionMatrix), function(i) Mclust( expressionMatrix[i,], G = 1:3,modelNames = "V" ))
|
691: fit=lapply(1:nrow(expressionMatrix), function(i) Mclust( expressionMatrix[i,], G = 1:3, prior=priorControl(shrinkage=0,scale=getScaleMAD(beta,expressionMatrix[i,],G=1:3,1)),modelNames = "V" ))
|
703: ...(12 bytes skipped)...glikelihood=t(sapply(1:length(fit), function(i) getLoglikelihoodFromBIC(fit[[i]]$BIC,ncol(expressionMatrix))))
|
704: ...(21 bytes skipped)...=lapply(1:nrow(M_loglikelihood), function(i) getLambdaBIC(lambda,M_loglikelihood[i,],ncol(expressionMatrix)))
|
707: fitlambda=lapply(1:nrow(expressionMatrix), function(i) Mclust(expressionMatrix[i,],G=L_G_lambdaBIC[[i]]$G,modelNames="V"))
|
710: fitlambda=lapply(1:nrow(expressionMatrix), function(i) Mclust(expressionMatrix[i,],G=L_G_lambdaBIC[[i]]$G,prior=priorControl(shrinkage=0,scale=getScaleMAD(beta,expressionMatrix[i,],G=L_G_lambdaBIC[[i]]$G,1)),modelNames="V"))
|
715: fit2=lapply(1:nrow(expressionMatrix), function(i) mclust_step2(rownames(expressionMatrix)[i],expressionMatrix[i,],G_initial=fit[[i]]$G,fitlambda[[i]]))
|
716: names(fit2)=row.names(expressionMatrix)
|
747: fitNoPriorWithExclusion <- function(expressionMatrix,specificOutlierStep1=FALSE,param.detection=NULL,lambda=1,beta=0){
|
751: identic_row_ids=getIdenticRow(expressionMatrix)
|
753: expressionMatrix=expressionMatrix[-(identic_row_ids),]
|
764: fit=lapply(1:nrow(expressionMatrix), function(i) Mclust( expressionMatrix[i,], G = 1:3,modelNames = "V" ))
|
769: ## fit=lapply(1:nrow(expressionMatrix), function(i) Mclust( expressionMatrix[i,], G = 1:3, prior=priorControl(shrinkage=0,scale=getScaleMAD(beta,expressionMatrix[i,],G=1:3,1)),modelNames = "V" ))
|
772: fit2=lapply(1:nrow(expressionMatrix), function(i)
|
773: if(length(which(names(specificOutlierStep1)==rownames(expressionMatrix)[i]))>0){
|
774: callMclustInStep2(rownames(expressionMatrix)[i],colnames(expressionMatrix),expressionMatrix...(27 bytes skipped)...it[[i]],beta_value=beta,specificOutlierStep1[[which(names(specificOutlierStep1)==rownames(expressionMatrix)[i])]])
|
777: callMclustInStep2(rownames(expressionMatrix)[i],colnames(expressionMatrix),expressionMatrix[i,],G_initial=fit[[i]]$G,fit[[i]],beta_value=beta, NULL)
|
780: names(fit2)=row.names(expressionMatrix)
|
786: getSpecificOutliersStep1 <- function(expressionMatrix,fit1=NULL,param.detection=NULL, multitest.correction.method="BY", prefix.file=NULL, print.hist.pv=F...(6 bytes skipped)...
|
808: resultSpecific=getSpecific(expressionMatrix,fit=fit1,param_d,specificOutlierStep1=NULL,multitest.correction.method="BY",prefix.file=paste(prefi...(44 bytes skipped)...
|
809: L_specific_Step1=lapply(1:nrow(expressionMatrix...(15 bytes skipped)...if(length(which(names(resultSpecific$L.specific.result$L.condition.specific.id)==rownames(expressionMatrix...(4 bytes skipped)...))>0) {as.vector(unlist(resultSpecific$L.specific.result$L.condition.specific.id[rownames(expressionMatrix)[i]]))}
|
812: names(L_specific_Step1)=rownames(expressionMatrix)
|
818: getSpecificResult<- function(expressionMatrix,fit2=NULL,param.detection=NULL,specificOutlierStep1=NULL,multitest.correction.method="BY",prefix.fi...(29 bytes skipped)...
|
836: resultSpecific=getSpecific(expressionMatrix,fit=fit2,param.detection=param_d,specificOutlierStep1=specificOutlierStep1,multitest.correction.met...(61 bytes skipped)...
|
842: getSpecific <- function(expressionMatrix,fit,param.detection,specificOutlierStep1=NULL,multitest.correction.method="BY",prefix.file=NULL,pri...(39 bytes skipped)...
|
854: identic_row_ids=getIdenticRow(expressionMatrix)
|
856: expressionMatrix=expressionMatrix[-(identic_row_ids),]
|
859: L_diff_median=lapply(1:nrow(expressionMatrix), function(i) getDifferenceMedian(expressionMatrix[i,],fit[[i]]))
|
862: L_null_min_lk_values_rsd=lapply(1:nrow(expressionMatrix), function(p) if(length(which(names(specificOutlierStep1)==rownames(expressionMatrix)[p]))>0){
|
863: getNullLoglikelihoodRsdMd(expressionMatrix...(76 bytes skipped)...ective_threshold,length(specificOutlierStep1[[which(names(specificOutlierStep1)==rownames(expressionMatrix)[p])]]))
|
866: getNullLoglikelihoodRsdMd(expressionMatrix[p,],fit[[p]]$NorMixParam,L_diff_median[[p]],min_loglike,min_rsd,percent_selective_threshold,0)
|
871: names(L_null)=rownames(expressionMatrix)
|
873: names(L_min_lk_values)=rownames(expressionMatrix)
|
875: names(L_rsd)=rownames(expressionMatrix)
|
877: M_null_mean_pv=t(sapply(1:nrow(expressionMatrix), function(i) getPValueMean(expressionMatrix[i,],fit[[i]]$NorMixParam,L_null[[i]])))
|
879: M_signe=t(sapply(1:nrow(expressionMatrix), function(i) expressionMatrix[i,]<M_null_mean[i]))
|
898: ## row.names(M_pv)=row.names(expressionMatrix)
|
899: ## colnames(M_pv)=colnames(expressionMatrix)
|
904: M_pv=matrix(M_pv1,ncol=ncol(expressionMatrix),nrow=nrow(expressionMatrix),byrow = FALSE)
|
905: row.names(M_pv)=row.names(expressionMatrix)
|
906: colnames(M_pv)=colnames(expressionMatrix)
|
940: print("The expressionMatrix argument that you entered has been coverted to a matrix using the exprs() function of the Biobase p...(8 bytes skipped)...
|
962: SpeCond<- function(expressionMatrix,param.detection=NULL,multitest.correction.method="BY",prefix.file="A",print.hist.pv=FALSE,fit1=NULL...(93 bytes skipped)...
|
964: if(is(expressionMatrix,"ExpressionSet"))
|
966: ## expressionMatrix=exprs(expressionMatrix)
|
967: expressionMatrix=getMatrixFromExpressionSet(expressionMatrix,condition.factor,condition.method)
|
968: print("The expressionMatrix argument that you entered has been coverted to a matrix using the getMatrixFromExpressionSet() function")
|
971: if(!is(expressionMatrix,"matrix")){
|
972: stop("The expressionMatrix argument used must be a matrix or an ExpressionSet object")
|
976: if(ncol(expressionMatrix)<8){
|
987: L_b_fit=fitPrior(expressionMatrix,lambda=param.detection[1,"lambda"],beta=param.detection[1,"beta"],evaluation.lambda.beta=FALSE)
|
991: specificOutlierStep1=getSpecificOutliersStep1(expressionMatrix,fit=fit1,param.detection=param.detection,multitest.correction.method="BY",prefix.file=prefix.file,p...(19 bytes skipped)...
|
1000: fit2=fitNoPriorWithExclusion(expressionMatrix,specificOutlierStep1=specificOutlierStep1,lambda=param.detection[2,"lambda"],beta=param.detection[2...(9 bytes skipped)...
|
1003: specificResult=getSpecificResult(expressionMatrix,fit=fit2,specificOutlierStep1=specificOutlierStep1,param.detection=param.detection,multitest.correc...(92 bytes skipped)...
|
OpenStats:R/Auxi.R: [ ] |
---|
109: Matrix2List <- function(x, ...) {
|
2636: XclassValue <- tapply(controls[, depVariable], cutsC, function(x) {
|
2640: MclassValue <- lapply(
|
2646: CclassValue <- lapply(XclassValue, length)
|
4487: FormatPvalueClassificationTag <- function(x, decimals = 4) {
|
71: is0 = function(obj = NULL, class2 = NULL) {
|
74: is.null(class2) ||
|
75: length(class2) < 1)
|
78: for (cl2 in class2) {
|
467: class(x) %in% c("matrix", "integer", "double", "numeric")) {
|
639: return(Matrix2List(out, sep = sep))
|
652: "Percentage change" = Matrix2List(out / ran * 100, sep = sep)
|
2401: if (class(x) %in% c("PhenList", "OpenStatsList")) {
|
2417: if (class(data) %in% c("PhenList", "OpenStatsList")) {
|
3031: if (any(class(x) %in% "glm")) {
|
3057: "Confidence" = Matrix2List(x = fixedEffInters),
|
3139: "Formula" = printformula(if (class(obj) %in% "lme") {
|
3774: class(aod) <- c("Anova", "data.frame")
|
4057: class(aod) <- c("anova", "data.frame")
|
2641: XclassValue,
|
2649: tbl <- rbind(unlist(CclassValue), unlist(MclassValue))
|
msPurity:vignettes/msPurity-spectral-database-vignette.html: [ ] |
---|
554: <text x='1005' y='228' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.metab_compound.compound_class'><text id='Default.metab_compound.compound_class' x='883' y='247'>compound_class</text><title>compound_class
|
715: <text x='333' y='420' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.fileinfo.class'><text id='Default.fileinfo.class' x='275' y='439'>class</text><title>class
|
85: code[class] {
|
184: ...(6648 bytes skipped)...ight:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class...(17168 bytes skipped)...flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:...(116552 bytes skipped)...
|
190: <p><body class='bg-light'></p>
|
192: <div class='container'>
|
196: <a href='https://www.dbschema.com' class='text-secondary small'> by DbSchema</a><br><br><br>
|
197: <div class='svg-container'>
|
201: ...(25 bytes skipped)... ( var i in el ){ var elem = document.getElementById(el[i]); if ( elem != null ) elem.setAttribute('class','highlight'); } }
|
202: ...(26 bytes skipped)... ( var i in el ){ var elem = document.getElementById(el[i]); if ( elem != null ) elem.setAttribute('class','scene'); } }
|
237: <path class='st0' d='m 62.011835,91.267143 c 3.536475,3.175214 2.262669,8.705999 -1.637711,11.015197 -3.594697,...(299 bytes skipped)...
|
238: <path class='st0' d='m 72.25864,84.624638 c 4.108046,3.143003 -0.737059,6.895259 -1.994918,8.323564 -3.586718,5...(359 bytes skipped)...
|
239: <path class='st0' d='m 78.230641,79.436735 c 4.142121,3.027466 -2.020102,10.435276 -3.450543,5.477315 3.306312,...(165 bytes skipped)...
|
240: <path class='st0' d='m 82.744502,72.597397 c -4.901605,1.926521 1.146497,6.285555 2.559694,2.225783 6.21817,3.5...(106 bytes skipped)...
|
241: <path class='st0' d='m 90.727458,64.259158 c 1.583987,1.690029 3.321317,3.2696 4.81267,5.026353 -2.535706,6.849...(275 bytes skipped)...
|
242: <path class='st0' d='m 99.622027,58.374253 c 1.493293,1.9548 -6.281936,7.024659 -0.885258,4.740447 0.386238,-4....(244 bytes skipped)...
|
243: <path class='st0' d='m 115.18023,50.570441 c -1.61703,5.201678 -4.6204,-0.364502 -7.01598,-1.749619 -4.40977,2....(370 bytes skipped)...
|
244: <path class='st0' d='m 120.54891,39.417125 c 2.50681,1.334124 4.80466,4.941837 0.75044,5.297362 -0.46414,1.8986...(280 bytes skipped)...
|
245: <path class='st0' d='m 128.50836,24.06821 c -5.10403,3.035506 3.20535,6.383175 5.05938,9.450276 -0.91853,2.9588...(206 bytes skipped)...
|
246: <path class='st0' d='m 137.14366,22.299812 c -3.09615,2.259885 0.71537,4.412454 1.99042,6.435866 -3.08975,5.080...(150 bytes skipped)...
|
247: <path class='st0' d='m 136.85093,14.890174 c 2.31562,5.283511 -7.17975,1.771993 -1.29675,-0.475107 l 0.7108,0.0...(190 bytes skipped)...
|
248: <path class='st0' d='m 149.95578,11.976423 c 2.50679,1.334142 4.80455,4.94192 0.75041,5.297394 -0.4641,1.898604...(279 bytes skipped)...
|
249: <path class='st0' d='m 153.26135,7.538431 c 2.60497,1.5799548 6.03999,5.944272 1.08117,6.050232 -2.53319,-3.231...(158 bytes skipped)...
|
403: <a xlink:href='https://www.dbschema.com'> <path class...(306 bytes skipped)...142,-5.37533 -5.137307,0.107342 -1.812268,5.992146 5.532698,4.379388 5.137307,-0.107342 z' /> <path class...(367 bytes skipped)...061,2.717467 -0.984368,1.810718 0.686994,-0.30388 1.029454,-1.087638 0.984368,-1.810718 z' /> <path class...(169 bytes skipped)....399287,3.075831 2.304111,2.48058 -2.124941,2.016587 2.688777,3.89858 2.198472,6.229403 z' /> <path class...(117 bytes skipped)...23,1.664746 -6.906229,-3.691132 0.354172,-3.663246 9.875349,-4.711252 6.558735,0.318822 z' /> <path class...(282 bytes skipped)....93704,-4.164951 3.518609,0.0063 -1.462376,6.166445 5.169629,-2.857523 6.19931,3.846079 z' /> <path class...(254 bytes skipped)...517 z m -3.414436,-0.578473 c -1.124703,-4.072004 -5.087405,2.125488 -0.316922,0.156453 z' /> <path class...(378 bytes skipped)...316 7.851251,0.524966 6.24018,4.690538 0.0379,0.969988 0.0954,1.940046 0.12008,2.909974 z' /> <path class='logo' d='m 110.47859,22.686058 c 0.91826,2.682088 0.13016,6.890551 -3.0725,4.397004 -1.63641,1.077...(288 bytes skipped)...
|
408: <rect class='grp' style='fill:#C4E0F9;stroke:#CED7E0' x='400' y='45' width='624' height='770' />
|
413: <rect class='grp' style='fill:#C4E0F9;stroke:#CED7E0' x='32' y='45' width='336' height='754' />
|
418: ...(236 bytes skipped)...s_peak_meta','Default.c_peak_X_s_peak_meta.cid','Default.c_peaks.cid'])" transform='translate(8,0)' class='scene' d='M 192,96L 144,96' >
|
422: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 192,96L 144,96' ></path>
|
424: c_peak_X_s_peak_meta ref c_peaks ( cid )' class='relName' style='fill:#748EA7'>cid</text>
|
426: ...(244 bytes skipped)...ak_meta','Default.c_peak_X_s_peak_meta.pid','Default.s_peak_meta.pid'])" transform='translate(8,0)' class='scene' d='M 352,112L 608,112' >
|
430: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 352,112L 608,112' ></path>
|
432: c_peak_X_s_peak_meta ref s_peak_meta ( pid )' class='relName' style='fill:#748EA7'>pid</text>
|
434: ...(178 bytes skipped)...k_s_peak_meta','Default.s_peak_meta.fileid','Default.fileinfo.fileid'])" transform='translate(8,0)' class='scene' d='M 608,352L 336,352' >
|
438: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 608,352L 336,352' ></path>
|
440: s_peak_meta ref fileinfo ( fileid )' class='relName' style='fill:#748EA7'>fileid</text>
|
442: ...(189 bytes skipped)...s_peak_meta_source','Default.s_peak_meta.souceid','Default.source.id'])" transform='translate(8,0)' class='scene' d='M 608,208L 560,208' >
|
446: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 608,208L 560,208' ></path>
|
448: s_peak_meta ref source ( souceid -> id )' class='relName' style='fill:#748EA7'>souceid</text>
|
450: ...(255 bytes skipped)...Default.s_peak_meta.inchikey_id','Default.metab_compound.inchikey_id'])" transform='translate(8,0)' class='scene' d='M 768,96L 848,96' >
|
454: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 768,96L 848,96' ></path>
|
456: s_peak_meta ref metab_compound ( inchikey_id )' class='relName' style='fill:#748EA7'>inchikey_id</text>
|
458: ...(140 bytes skipped)...['s_peaks_Fk_s_peaks','Default.s_peaks.pid','Default.s_peak_meta.pid'])" transform='translate(8,0)' class='scene' d='M 560,400L 608,400' >
|
462: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 560,400L 608,400' ></path>
|
464: s_peaks ref s_peak_meta ( pid )' class='relName' style='fill:#748EA7'>pid</text>
|
466: ...(264 bytes skipped)...','Default.c_peak_X_c_peak_group.grpid','Default.c_peak_groups.grpid'])" transform='translate(8,0)' class='scene' d='M 80,512L 80,576' >
|
470: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 80,512L 80,576' ></path>
|
472: c_peak_X_c_peak_group ref c_peak_groups ( grpid )' class='relName' style='fill:#748EA7'>grpid</text>
|
474: ...(244 bytes skipped)...peak_group','Default.c_peak_X_c_peak_group.cid','Default.c_peaks.cid'])" transform='translate(8,0)' class='scene' d='M 80,368L 80,336' >
|
478: <path transform='translate(8,0)' marker-start='url(#foot0p)' marker-end='url(#arrow1)' class='dotted ' d='M 80,368L 80,336' ></path>
|
480: c_peak_X_c_peak_group ref c_peaks ( cid )' class='relName' style='fill:#748EA7'>cid</text>
|
482: <rect class='entity' style='stroke:#308F1E' x='64' y='72' width='80' height='256' rx='8' ry='8' style='stroke:n...(6 bytes skipped)...
|
484: <rect class='entity' x='64' y='72' width='80' height='256' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
493: <text x='141' y='132' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.mzmin'><text id='Default.c_peaks.mzmin' x='83' ...(32 bytes skipped)...
|
495: <text x='141' y='148' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.mzmax'><text id='Default.c_peaks.mzmax' x='83' ...(32 bytes skipped)...
|
497: <text x='141' y='164' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.rt'><text id='Default.c_peaks.rt' x='83' y='183...(20 bytes skipped)...
|
499: <text x='141' y='180' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.rtmin'><text id='Default.c_peaks.rtmin' x='83' ...(32 bytes skipped)...
|
501: <text x='141' y='196' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.rtmax'><text id='Default.c_peaks.rtmax' x='83' ...(32 bytes skipped)...
|
503: <text x='141' y='212' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks._into'><text id='Default.c_peaks._into' x='83' ...(32 bytes skipped)...
|
505: <text x='141' y='228' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.intf'><text id='Default.c_peaks.intf' x='83' y=...(28 bytes skipped)...
|
507: <text x='141' y='244' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.maxo'><text id='Default.c_peaks.maxo' x='83' y=...(28 bytes skipped)...
|
509: <text x='141' y='260' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.maxf'><text id='Default.c_peaks.maxf' x='83' y=...(28 bytes skipped)...
|
511: <text x='141' y='276' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.sn'><text id='Default.c_peaks.sn' x='83' y='295...(20 bytes skipped)...
|
513: <text x='141' y='292' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peaks.fileid'><text id='Default.c_peaks.fileid' x='83...(174 bytes skipped)...
|
518: <rect class='entity' style='stroke:#1E498F' x='432' y='184' width='128' height='96' rx='8' ry='8' style='stroke...(8 bytes skipped)...
|
520: <rect class='entity' x='432' y='184' width='128' height='96' rx='8' ry='8' style='fill:none;stroke:#DADCE1'/>
|
528: <text x='557' y='244' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.source.parsing_software'><text id='Default.source.parsi...(75 bytes skipped)...
|
530: <text x='557' y='260' text-anchor='end' class='colType'>t</text>
|
532: <rect class='entity' style='stroke:#1E498F' x='864' y='72' width='144' height='240' rx='8' ry='8' style='stroke...(8 bytes skipped)...
|
534: <rect class='entity' x='864' y='72' width='144' height='240' rx='8' ry='8' style='fill:none;stroke:#DADCE1'/>
|
542: <text x='1005' y='132' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.metab_compound.pubchem_id'><text id='Default.metab_comp...(67 bytes skipped)...
|
544: <text x='1005' y='148' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.metab_compound.chemspider_id'><text id='Default.metab_c...(79 bytes skipped)...
|
546: <text x='1005' y='164' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.metab_compound.other_names'><text id='Default.metab_com...(71 bytes skipped)...
|
548: <text x='1005' y='180' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.metab_compound.exact_mass'><text id='Default.metab_comp...(67 bytes skipped)...
|
550: <text x='1005' y='196' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.metab_compound.molecular_formula'><text id='Default.met...(95 bytes skipped)...
|
552: <text x='1005' y='212' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.metab_compound.molecular_weight'><text id='Default.meta...(91 bytes skipped)...
|
556: <text x='1005' y='244' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.metab_compound.smiles'><text id='Default.metab_compound...(51 bytes skipped)...
|
558: <text x='1005' y='260' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.metab_compound.created_at'><text id='Default.metab_comp...(67 bytes skipped)...
|
560: <text x='1005' y='276' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.metab_compound.updated_at'><text id='Default.metab_comp...(67 bytes skipped)...
|
562: <text x='1005' y='292' text-anchor='end' class='colType'>t</text>
|
564: <rect class='entity' style='stroke:#308F1E' x='208' y='88' width='144' height='96' rx='8' ry='8' style='stroke:...(7 bytes skipped)...
|
566: <rect class='entity' x='208' y='88' width='144' height='96' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
571: <text x='349' y='132' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_X_s_peak_meta.pid'><text id='Default.c_peak_X_s_...(241 bytes skipped)...
|
579: <rect class='entity' style='stroke:#308F1E' x='624' y='72' width='144' height='688' rx='8' ry='8' style='stroke...(8 bytes skipped)...
|
581: <rect class='entity' x='624' y='72' width='144' height='688' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
590: <text x='765' y='132' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.acquisitionNum'><text id='Default.s_peak_me...(77 bytes skipped)...
|
592: <text x='765' y='148' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.precursorIntensity'><text id='Default.s_pea...(93 bytes skipped)...
|
594: <text x='765' y='164' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.precursorScanNum'><text id='Default.s_peak_...(85 bytes skipped)...
|
596: <text x='765' y='180' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.retentionTime'><text id='Default.s_peak_met...(73 bytes skipped)...
|
598: <text x='765' y='196' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.precursorNearest'><text id='Default.s_peak_...(85 bytes skipped)...
|
600: <text x='765' y='212' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.aMz'><text id='Default.s_peak_meta.aMz' x='...(33 bytes skipped)...
|
602: <text x='765' y='228' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.aPurity'><text id='Default.s_peak_meta.aPur...(49 bytes skipped)...
|
604: <text x='765' y='244' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.apkNm'><text id='Default.s_peak_meta.apkNm'...(41 bytes skipped)...
|
606: <text x='765' y='260' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.iMz'><text id='Default.s_peak_meta.iMz' x='...(33 bytes skipped)...
|
608: <text x='765' y='276' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.iPurity'><text id='Default.s_peak_meta.iPur...(49 bytes skipped)...
|
610: <text x='765' y='292' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.ipkNm'><text id='Default.s_peak_meta.ipkNm'...(41 bytes skipped)...
|
612: <text x='765' y='308' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.inPkNm'><text id='Default.s_peak_meta.inPkN...(45 bytes skipped)...
|
614: <text x='765' y='324' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.inPurity'><text id='Default.s_peak_meta.inP...(53 bytes skipped)...
|
616: <text x='765' y='340' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.purity_pass_flag'><text id='Default.s_peak_...(85 bytes skipped)...
|
618: <text x='765' y='356' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.name'><text id='Default.s_peak_meta.name' x...(37 bytes skipped)...
|
620: <text x='765' y='372' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.collision_energy'><text id='Default.s_peak_...(85 bytes skipped)...
|
622: <text x='765' y='388' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.ms_level'><text id='Default.s_peak_meta.ms_...(53 bytes skipped)...
|
624: <text x='765' y='404' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.accession'><text id='Default.s_peak_meta.ac...(57 bytes skipped)...
|
626: <text x='765' y='420' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.resolution'><text id='Default.s_peak_meta.r...(61 bytes skipped)...
|
628: <text x='765' y='436' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.polarity'><text id='Default.s_peak_meta.pol...(53 bytes skipped)...
|
630: <text x='765' y='452' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.fragmentation_type'><text id='Default.s_pea...(93 bytes skipped)...
|
632: <text x='765' y='468' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.precursor_type'><text id='Default.s_peak_me...(77 bytes skipped)...
|
634: <text x='765' y='484' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.instrument_type'><text id='Default.s_peak_m...(81 bytes skipped)...
|
636: <text x='765' y='500' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.instrument'><text id='Default.s_peak_meta.i...(61 bytes skipped)...
|
638: <text x='765' y='516' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.copyright'><text id='Default.s_peak_meta.co...(57 bytes skipped)...
|
640: <text x='765' y='532' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.column'><text id='Default.s_peak_meta.colum...(45 bytes skipped)...
|
642: <text x='765' y='548' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.mass_accuracy'><text id='Default.s_peak_met...(73 bytes skipped)...
|
644: <text x='765' y='564' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.mass_error'><text id='Default.s_peak_meta.m...(61 bytes skipped)...
|
646: <text x='765' y='580' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.origin'><text id='Default.s_peak_meta.origi...(45 bytes skipped)...
|
648: <text x='765' y='596' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.splash'><text id='Default.s_peak_meta.splas...(45 bytes skipped)...
|
650: <text x='765' y='612' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.retention_index'><text id='Default.s_peak_m...(81 bytes skipped)...
|
652: <text x='765' y='628' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.retention_time'><text id='Default.s_peak_me...(77 bytes skipped)...
|
654: <text x='765' y='644' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.inchikey_id'><text id='Default.s_peak_meta....(271 bytes skipped)...
|
662: <text x='765' y='692' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peak_meta.spectrum_type'><text id='Default.s_peak_met...(73 bytes skipped)...
|
664: <text x='765' y='708' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.grpid'><text id='Default.s_peak_meta.grpid'...(41 bytes skipped)...
|
666: <text x='765' y='724' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peak_meta.fileid'><text id='Default.s_peak_meta.filei...(199 bytes skipped)...
|
672: <rect class='entity' style='stroke:#308F1E' x='64' y='584' width='96' height='192' rx='8' ry='8' style='stroke:...(7 bytes skipped)...
|
674: <rect class='entity' x='64' y='584' width='96' height='192' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
683: <text x='157' y='644' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.mzmin'><text id='Default.c_peak_groups.mz...(44 bytes skipped)...
|
685: <text x='157' y='660' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.mzmax'><text id='Default.c_peak_groups.mz...(44 bytes skipped)...
|
687: <text x='157' y='676' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.rt'><text id='Default.c_peak_groups.rt' x...(32 bytes skipped)...
|
689: <text x='157' y='692' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.rtmin'><text id='Default.c_peak_groups.rt...(44 bytes skipped)...
|
691: <text x='157' y='708' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.rtmax'><text id='Default.c_peak_groups.rt...(44 bytes skipped)...
|
693: <text x='157' y='724' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.npeaks'><text id='Default.c_peak_groups.n...(48 bytes skipped)...
|
695: <text x='157' y='740' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_groups.grp_name'><text id='Default.c_peak_groups...(56 bytes skipped)...
|
697: <text x='157' y='756' text-anchor='end' class='colType'>t</text><text x='80' y='772'>–more–</text>
|
700: <rect class='entity' style='stroke:#308F1E' x='256' y='328' width='80' height='128' rx='8' ry='8' style='stroke...(8 bytes skipped)...
|
702: <rect class='entity' x='256' y='328' width='80' height='128' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
711: <text x='333' y='388' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.fileinfo.filepth'><text id='Default.fileinfo.filepth' x...(43 bytes skipped)...
|
713: <text x='333' y='404' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.fileinfo.nm_save'><text id='Default.fileinfo.nm_save' x...(43 bytes skipped)...
|
717: <text x='333' y='436' text-anchor='end' class='colType'>t</text>
|
719: <rect class='entity' style='stroke:#308F1E' x='416' y='376' width='144' height='416' rx='8' ry='8' style='strok...(9 bytes skipped)...
|
721: <rect class='entity' x='416' y='376' width='144' height='416' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
726: <text x='557' y='420' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.fileid'><text id='Default.s_peaks.fileid' x='43...(37 bytes skipped)...
|
728: <text x='557' y='436' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.mz'><text id='Default.s_peaks.mz' x='435' y='45...(21 bytes skipped)...
|
730: <text x='557' y='452' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.i'><text id='Default.s_peaks.i' x='435' y='471'...(17 bytes skipped)...
|
732: <text x='557' y='468' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.snr'><text id='Default.s_peaks.snr' x='435' y='...(25 bytes skipped)...
|
734: <text x='557' y='484' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.ra'><text id='Default.s_peaks.ra' x='435' y='50...(21 bytes skipped)...
|
736: <text x='557' y='500' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.type'><text id='Default.s_peaks.type' x='435' y...(29 bytes skipped)...
|
738: <text x='557' y='516' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.ra_pass_flag'><text id='Default.s_peaks.ra_pass...(61 bytes skipped)...
|
740: <text x='557' y='532' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.snr_pass_flag'><text id='Default.s_peaks.snr_pa...(65 bytes skipped)...
|
742: <text x='557' y='548' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.pass_flag'><text id='Default.s_peaks.pass_flag'...(49 bytes skipped)...
|
744: <text x='557' y='564' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.scan'><text id='Default.s_peaks.scan' x='435' y...(29 bytes skipped)...
|
746: <text x='557' y='580' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.purity_pass_flag'><text id='Default.s_peaks.pur...(77 bytes skipped)...
|
748: <text x='557' y='596' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.intensity_pass_flag'><text id='Default.s_peaks....(89 bytes skipped)...
|
750: <text x='557' y='612' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.cl'><text id='Default.s_peaks.cl' x='435' y='63...(21 bytes skipped)...
|
752: <text x='557' y='628' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.rsd'><text id='Default.s_peaks.rsd' x='435' y='...(25 bytes skipped)...
|
754: <text x='557' y='644' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.count'><text id='Default.s_peaks.count' x='435'...(33 bytes skipped)...
|
756: <text x='557' y='660' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.total'><text id='Default.s_peaks.total' x='435'...(33 bytes skipped)...
|
758: <text x='557' y='676' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.inPurity'><text id='Default.s_peaks.inPurity' x...(45 bytes skipped)...
|
760: <text x='557' y='692' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.frac'><text id='Default.s_peaks.frac' x='435' y...(29 bytes skipped)...
|
762: <text x='557' y='708' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.s_peaks.minnum_pass_flag'><text id='Default.s_peaks.min...(77 bytes skipped)...
|
764: <text x='557' y='724' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.minfrac_pass_flag'><text id='Default.s_peaks.mi...(81 bytes skipped)...
|
766: <text x='557' y='740' text-anchor='end' class='colType'>t</text> <a xlink:href='#Default.s_peaks.grpid'><text id='Default.s_peaks.grpid' x='435'...(179 bytes skipped)...
|
774: <rect class='entity' style='stroke:#308F1E' x='48' y='376' width='144' height='128' rx='8' ry='8' style='stroke...(8 bytes skipped)...
|
776: <rect class='entity' x='48' y='376' width='144' height='128' rx='8' ry='8' style='fill:none;stroke:#DBE1DA'/>
|
781: <text x='189' y='420' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_X_c_peak_group.idi'><text id='Default.c_peak_X_c...(52 bytes skipped)...
|
783: <text x='189' y='436' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_X_c_peak_group.bestpeak'><text id='Default.c_pea...(72 bytes skipped)...
|
785: <text x='189' y='452' text-anchor='end' class='colType'>#</text> <a xlink:href='#Default.c_peak_X_c_peak_group.grpid'><text id='Default.c_peak_X...(262 bytes skipped)...
|
261: <feColorMatrix result='matrixOut' in='offOut' type='matrix'
|
tidySummarizedExperiment:R/utilities.R: [ ] |
---|
155: add_class <- function(var, name) {
|
172: drop_class <- function(var, name) {
|
71: dplyr::summarise_all(class) %>%
|
72: tidyr::gather(variable, class) %>%
|
73: pull(class) %>%
|
144: #' Add class to abject
|
156: if (!name %in% class(var)) class(var) <- prepend(class(var), name)
|
161: #' Remove class to abject
|
167: #' @param name A character name of the class
|
173: class(var) <- class(var)[!class(var) %in% name]
|
628: if(is(.x, "dgCMatrix") | is(.x, "DelayedArray")) {
|
signifinder:R/SignatureFunction.R: [ ] |
---|
1332: sign_class <- unique(sign_df[,2:3])
|
11: #' Alternatively, an object of type \linkS4class{SummarizedExperiment},
|
24: #' @return If dataset is a \linkS4class{SummarizedExperiment} object, then
|
27: #' \linkS4class{SummarizedExperiment} object is created in which scores are
|
50: EL <- sign_df[grep("Epithelial-like", sign_df$class), ]
|
51: ML <- sign_df[grep("Mesenchymal-like", sign_df$class), ]
|
76: Sign_E <- sign_df$SYMBOL[sign_df$class == "E"]
|
77: Sign_M <- sign_df$SYMBOL[sign_df$class == "M"]
|
433: sign_df$NAME[sign_df$class == "MHC"]))], na.rm = TRUE)
|
436: sign_df$NAME[sign_df$class == "CP"]))], na.rm = TRUE)
|
439: sign_df$NAME[sign_df$class == "EC"]))], na.rm = TRUE)
|
442: sign_df$NAME[sign_df$class == "SC"]))], na.rm = TRUE)
|
634: row.names(datasetm_n), sign_df$SYMBOL[sign_df$class == "Housekeeping"])
|
636: row.names(datasetm_n), sign_df$SYMBOL[sign_df$class == "TInflam"])
|
729: CIN_Carter$SYMBOL[CIN_Carter$class == "CIN25"],
|
891: sign_list <- split(sign_df$SYMBOL, sign_df$class)
|
942: sign_list <- split(sign_df$SYMBOL, sign_df$class)
|
989: sign_up <- sign_df[grep("up", sign_df$class), ]
|
990: sign_down <- sign_df[grep("down", sign_df$class), ]
|
1069: sign_df[sign_df$class == "OS", ], datasetm_n,
|
1072: sign_df[sign_df$class == "DFS", ], datasetm_n,
|
1088: #' Extracellular Matrix Signature
|
1113: sign_up <- sign_df[grep("ECMup", sign_df$class), ]
|
1114: sign_down <- sign_df[grep("ECMdown", sign_df$class), ]
|
1194: sign_list <- split(sign_df$SYMBOL, sign_df$class)
|
1282: colnames(datasetm_n), sign_df[sign_df$class == "high", ]$SYMBOL)
|
1284: colnames(datasetm_n), sign_df[sign_df$class == "low", ]$SYMBOL)
|
1321: sign_list <- split(sign_df$SYMBOL, sign_df$class)
|
1333: sign_class <- sign_class[sign_class$class %in% row.names(gsva_matrix), ]
|
1334: columnNA <- .managena(datasetm = gsva_matrix, genes = sign_class$class)
|
1336: gsva_matrix[sign_class$class, ] * sign_class$coeff, na.rm = TRUE)
|
44: datasetm <- .getMatrix(dataset)
|
140: datasetm <- .getMatrix(dataset)
|
190: datasetm <- .getMatrix(dataset)
|
231: datasetm <- .getMatrix(dataset)
|
257: datasetm <- .getMatrix(dataset)
|
290: datasetm <- .getMatrix(dataset)
|
350: datasetm <- .getMatrix(dataset)
|
402: datasetm <- .getMatrix(dataset)
|
474: datasetm <- .getMatrix(dataset)
|
500: datasetm <- .getMatrix(dataset)
|
531: datasetm <- .getMatrix(dataset)
|
572: datasetm <- .getMatrix(dataset)
|
598: datasetm <- .getMatrix(dataset)
|
630: datasetm <- .getMatrix(dataset)
|
665: datasetm <- .getMatrix(dataset)
|
695: datasetm <- .getMatrix(dataset)
|
722: datasetm <- .getMatrix(dataset)
|
743: #' Cell-cycle Signature classifier
|
760: datasetm <- .getMatrix(dataset)
|
807: datasetm <- .getMatrix(dataset)
|
843: datasetm <- .getMatrix(dataset)
|
883: datasetm <- .getMatrix(dataset)
|
934: datasetm <- .getMatrix(dataset)
|
987: datasetm <- .getMatrix(dataset)
|
1029: datasetm <- .getMatrix(dataset)
|
1062: datasetm <- .getMatrix(dataset)
|
1111: datasetm <- .getMatrix(dataset)
|
1157: datasetm <- .getMatrix(dataset)
|
1196: datasetm <- .getMatrix(dataset)
|
1238: datasetm <- .getMatrix(dataset)
|
1269: datasetm <- .getMatrix(dataset)
|
1313: datasetm <- .getMatrix(dataset)
|
gaggle:R/gaggle.R: [ ] |
---|
720: j.class <- .jcall(.jcall(value, "Ljava/lang/Class;", "getClass"), "Ljava/lang/String;", "getName")
|
126: getMatrix <- function ()
|
379: getJavaClassName <- function(jobj, quiet=FALSE) {
|
374: return (class(obj)=="jobjRef" && isS4(obj) && slot(obj, "jclass")=="org/systemsbiology/gaggle/core/datatypes/Tuple" && !is.jnull(obj))
|
378: # get the Java class name of an rJava object
|
380: if (class(jobj)=='jobjRef') {
|
384: return(.jcall(.jcall(jobj, 'Ljava/lang/Class;', 'getClass'), 'S', 'getName'))
|
434: else if (class (x) == "graphNEL") {
|
438: else if (class (x) == "environment") {
|
721: # cat("j.class = ", j.class, "\n")
|
722: if (j.class == "org.systemsbiology.gaggle.core.datatypes.Tuple") {
|
756: else if (class(value)=='list') {
|
759: else if (class(value)=='jobjRef') {
|
21: # Before starting VM, set the system classpath to a blank string
|
23: # if the classpath has spaces in it (which it often does on
|
26: Sys.unsetenv("CLASSPATH")
|
405: .jcall (goose, "V", "createAndBroadcastMatrix", rownames (x), colnames (x),
|
128: rowCount <- .jcall (goose, "I", "getMatrixRowCount")
|
129: columnCount <- .jcall (goose, "I", "getMatrixColumnCount")
|
130: matrixRowNames <- .jcall (goose, "[S", "getMatrixRowNames")
|
131: matrixColumnNames <- .jcall (goose, "[S", "getMatrixColumnNames")
|
137: data <- .jcall (goose, "[D", "getAllMatrixData");
|
388: cat("Error in getJavaClassName: Not a java object?\n")
|
719: # Note that the current method will fail to detect subclasses of Tuple
|
TCGAbiolinks:R/analyze.R: [ ] |
---|
327: tabSurv_Matrix <- plyr::adply(.data =1:length(rownames(dataNormal)),.margins = 1,.fun = function(i){
|
333: tabSurv_Matrix <- data.frame("mRNA" = mRNAselected)
|
12: #' @return object of class hclust if method selected is 'hclust'.
|
16: #' (consensus class assignments). ConsensusClusterPlus also produces images.
|
56: #' @param object gene expression of class RangedSummarizedExperiment from TCGAprepare
|
389: tabSurv_Matrix[1, "Cancer Deaths"] <- deads_complete
|
390: tabSurv_Matrix[1, "Cancer Deaths with Top"] <- deads_top
|
391: tabSurv_Matrix[1, "Cancer Deaths with Down"] <- deads_down
|
392: tabSurv_Matrix[1, "Mean Normal"] <- mean(as.numeric(mRNAselected_values_normal))
|
397: tabSurv_Matrix[1, "Mean Tumor Top"] <- mean(as.numeric(dataCancer_onlyTop_sample_mRNASelected))
|
398: tabSurv_Matrix[1, "Mean Tumor Down"] <- mean(as.numeric(dataCancer_onlyDown_sample_mRNASelected))
|
420: tabSurv_Matrix[1, "pvalue"] <- tabSurv_pvalue
|
444: tabSurv_Matrix
|
447: tabSurv_Matrix[tabSurv_Matrix == "-Inf"] <- 0
|
449: tabSurvKM <- tabSurv_Matrix
|
723: #' It is possible to do a two-class analysis.
|
746: #' @param Cond1type a string containing the class label of the samples in mat1
|
748: #' @param Cond2type a string containing the class label of the samples in mat2
|
1259: #' @param typeCond1 a string containing the class label of the samples
|
1261: #' @param typeCond2 a string containing the class label of the samples
|
1617: fit <- limma::lmFit(AffySet, design) ## fit is an object of class MArrayLM.
|
15: #' consensusMatrix (numerical matrix), consensusTree (hclust), consensusClass
|
1331: #'identify classes of genes or proteins that are #'over-represented using
|
spatzie:R/find_ep_coenrichment.R: [ ] |
---|
247: jaspar_matrix_class <- "PFM"
|
255: matrixClass = jaspar_matrix_class)
|
158: stop("'int_raw_data' data type unsupported: ", class(int_raw_data))
|
221: promoter_left <- S4Vectors::elementMetadata(anchor1)[, "node.class"] == "promoter"
|
222: promoter_right <- S4Vectors::elementMetadata(anchor2)[, "node.class"] == "promoter"
|
249: jaspar_matrix_class <- "PWMProb"
|
251: jaspar_matrix_class <- "PWM"
|
118: #' @importFrom TFBSTools readJASPARMatrix
|
254: motifs <- TFBSTools::readJASPARMatrix(motifs_file,
|
genefu:R/subtype.cluster.R: [ ] |
---|
200: class.tr <- mclust::map(emclust.tr$z, warn=FALSE)
|
149: uclass <- sort(unique(rr3$classification))
|
156: nclass <- uclass[order(mm, decreasing=TRUE)[1]]
|
194: myclass <- mclust::unmap(rr3$classification)
|
233: mclust::mclust2Dplot(data=dd[ , c("ESR1", "ERBB2"), drop=FALSE], what="classification", classification=class.tr, parameters=mclust.tr$parameters, colors=c("darkred", "darkgreen", "darkblue"), xlim=myxlim, yli...(9 bytes skipped)...
|
16: #' @param module.ESR1 Matrix containing the ESR1-related gene(s) in
|
23: #' @param data Matrix of gene expressions with samples in rows and probes
|
25: #' @param annot Matrix of annotations with at least one column named
|
30: #' @param mapping **DEPRECATED** Matrix with columns "EntrezGene.ID" and
|
66: #' - module.scores: Matrix containing ESR1, ERBB2 and AURKA module scores.
|
201: names(class.tr) <- dimnames(dd)[[1]]
|
207: sbt[names(class.tr)] <- sbtn[class.tr]
|
129: ## necessary if we want to validate the classifier using a different dataset
|
148: #redefine classification to be coherent with subtypes
|
150: uclass <- uclass[!is.na(uclass)]
|
151: if(length(uclass) != 3) { stop("less than 3 subtypes are identified!") }
|
153: for(i in 1:length(uclass)) {
|
154: mm <- c(mm, median(dd[rr3$classification == uclass[i],"ERBB2"], na.rm=TRUE) )
|
158: for(i in 1:length(uclass[-nclass])) {
|
159: mm <- c(mm, median(dd[rr3$classification == uclass[-nclass][i],"ESR1"], na.rm=TRUE))
|
161: nclass <- c(uclass[-nclass][order(mm, decreasing=TRUE)[2]], nclass, uclass[-nclass][order(mm, decreasing=TRUE)[1]])
|
162: #nclass contains the new order
|
163: rr3$z <- rr3$z[ ,nclass, drop=FALSE]
|
164: ncl <- rr3$classification
|
165: for(i in 1:length(uclass)) {
|
166: ncl[rr3$classification == nclass[i]] <- i
|
168: rr3$classification <- ncl
|
169: rr3$parameters$pro <- rr3$parameters$pro[nclass]
|
170: rr3$parameters$mean <- rr3$parameters$mean[ , nclass, drop=FALSE]
|
171: rr3$parameters$variance$sigma <- rr3$parameters$variance$sigma[ , , nclass, drop=FALSE]
|
195: dimnames(myclass)[[1]] <- dimnames(dd)[[1]]
|
196: mclust.tr <- mclust::mstep(modelName=model.name, data=dd[ , c("ESR1", "ERBB2"), drop=FALSE], z=myclass)
|
197: dimnames(mclust.tr$z) <- dimnames(myclass)
|
199: dimnames(emclust.tr$z) <- dimnames(myclass)
|
234: ...(6 bytes skipped)...nd(x="topleft", col=c("darkred", "darkgreen", "darkblue"), legend=sbtn, pch=mclust::mclust.options("classPlotSymbols")[1:length(uclass)], bty="n")
|