sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
197f49e2e36bb081fc419bf63e8dbed616184644fafedbb8523408745df05eae
R
965
31
sink(snakemake@log[[1]]) library(data.table) library(assertthat) source("workflow/scripts/mosaiclassifier_scripts/mosaiClassifier/mosaiClassifier.R") system("LC_CTYPE=C") # Currently read files from the Snakemake pipeline counts <- fread(paste("zcat", snakemake@input[["counts"]])) info <- fread(snakemake@input[["info"...
1af7cbb3f704189d5db9144463800058d537f5cc1af9f2555ca2dc6acc23704d
R
968
26
library(data.table) source("/g/korbel2/weber/workspace/mosaicatcher-update/workflow/scripts/mosaiclassifier_scripts/mosaiClassifier/makeSVcalls.R") probs <- readRDS("/g/korbel2/weber/MosaiCatcher_output/MosaiCatcher_output_sample_KG_dryrun/mosaiclassifier/haplotag_likelihoods/RPE-BM510.Rdata") llr <- as.numeric(4) use...
3c9d177ce176d95b4d169bb029fea3d7eb9759bb1b1c74419d01d156456032d1
R
969
46
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_dummy_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = c("100%", TABLE_HEIGHT_MODAL), width = c("auto", "100%") ) { ns <- shiny:...
30e6a6636e7ea6ca1736f49a7d2d09ea49dea2aa15bf56e7f5566f23fdd359c9
R
974
43
plsnipal_R <- function(x,y){ my <- nrow(y); ny <- ncol(y) if (ny > 1){ ssy <- round(colSums(y^2)); ymax <- max(ssy); yi <- which.max(ssy) u <- y[,yi]; } else { u <- y[,1]; } conv <- 1; told <- x[,1]; count <- 1.0; # Specify the conversion tolerance while (conv > 1e-4){ count <- count + 1; w <- t(t(as.matr...
9efe94ad4b3df837bfc898b587c5cf57ef7bf2afa37fa150a5379a7407e77943
R
985
25
#!/usr/bin/env Rscript # # This file is part of the AlignmentAndQCWorkflow plugin. # # This script is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 or 3 of the License. # # This script is distr...
90adc75b70880bc9aaa555f8b57023634b97f4bc08543e9204eb3806cb9861ef
R
993
34
get_first_passage_density = function(pars_list, dt=.01, ...){ density = do.call(ddm_integral_fpt, c(pars_list, dt=dt, ...)) rownames(density) = seq(dt, dt*nrow(density), dt) density } get_rt_liks = function(dat, density_list, min_p=1e-10){ min_p = as.numeric(min_p) #get time bin for each response tve...
150514973fa20005fd52565b51a7f17d29e48c72c77ef270ddb40e87f7e4c1b2
R
1,010
34
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## # Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R s...
fb27beb76f9089c4764764fd7ff078a8b24cf3f14f1ed3c248f5acaf5a7d4cd5
R
1,017
41
bestCandidate<-list() bestCandidate$id <- "bestcandidate" bestCandidate$title <- "Best Candidate" bestCandidate$loadData<- function(){ } bestCandidate$generateUI<- function(){ fluidRow( column(htmlOutput("bestCandidateOutput"), width = 12) ) } bestCandidate$serverLogic <- function(input,output,session,re...
61b0e84e4d7ab2c61b6537ab1ce3de190e112668c3fb58a20a3c630d23242189
R
1,027
39
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## UserProfileUI <- function(id) { ns <- shiny::NS(id) ## namespace div( class = "row", boardHeader(title = "User Profile", info_link = ns("board_info")), shiny::tabsetPanel(...
f59b719fd3a960be23b7684444e752b4a12f59c1d6a6237e043d9b0d69420651
R
1,036
24
#' @title double the values of X chr (for human male samples) #' @description Calculate Repli-seq assay count matrices after doubling the values of chrX windows #' #' @param rs_assay a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx (or S0) #' @param chr level of chr to doubl...
02fe19d50b6bdd10a6c5e1d03f7f100db12faa5c41156663459422a9f11c568f
R
1,037
37
# For calculating TSS enrichment library(GenomicFeatures) library(GenomicAlignments) library(rtracklayer) args <- commandArgs(trailingOnly = TRUE) bam_file <- args[1] gtf_file <- args[2] score_file <- args[3] upstream <- as.numeric(args[4]) downstream <- as.numeric(args[5]) # Read GTF and extract TSS txdb <- makeTxDb...
72b55e1da47cab109e3202ec6f1eb2c5c6ef6487cfed8e085b904a6a36e919a7
R
1,041
42
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## show_upgrade_modal <- function(timeout.min = 40) { require(shiny) msg <- HTML(paste0("<center><h4><b>Ditch the ", timeout.min, "-minute limit</h4> Upgrade today and get advanced analy...
3d37ce61ba542f8efad13e2ea21d7023c9f2b943f339545516d94adeeeddf23f
R
1,044
30
## ## Write license file of the used/installed packages ## # This file is supposed to run from the root Playground folder if (basename(getwd()) != "omicsplayground") { stop("Please run from the OmicsPlayground root folder") } ## packages used in omicplayground renv1 <- renv::dependencies(path = "components", r...
24d26edf28db0dbf28d29f388aa8bf26c10904101ed82cae6ca37ec7b7574b98
R
1,045
44
#' Open a URL using JavaScript in a Shiny App #' #' This function opens a given URL in a new browser window or tab using JavaScript #' within a Shiny app. This is particularly useful when using a Docker container, #' as the `browseURL()` function may not work as expected. #' #' @param url A character string representin...
3f66aa56fef475880b5f39cbcb76b7b55a5dd56f30d51243c942133ceb3b20bf
R
1,065
37
##### Summary of scRNA-seq DEG Analysis ##### library(openxlsx) library(glue) library(tidyr) library(ggplot2) library(viridus) cell_types = c("Astro", "L2_3_IT", "L4", "L5", "L6", "Lamp5", "Non-neuronal", "Oligo", "Pvalb", "Sncg", "Sst", "Vip") list <- vector(mode="list", length=length(cell_types)) list <- lapply(c...
adc9d214f278e6ced705516d5fdfca550534fe42f1aee5532b9828ab7723a31c
R
1,068
19
library(devtools) load_all("/g/korbel2/weber/Gits/Rsamtools/") load_all("/g/korbel2/weber/Gits/GenomicAlignments/") source("utils/haplotagTable.R") # tab <- getHaplotagTable2( # bedFile = "/g/korbel2/weber/MosaiCatcher_output/MosaiCatcher_output_sample_KG_chr21/haplotag/bed/RPE1-WT/100000.selected_j0.1_s0.5_sce...
998dc7cb3825d1891a130caae7d76e08c159e13901e86760ebb1180c29086ed9
R
1,074
33
library(ggplot2) library(reshape2) library(scales) args = commandArgs(trailingOnly=TRUE) x = read.table(args[1], header=F, na.strings=c(".", "NA")) colnames(x)[1] = c("cnv") x = melt(x, id.vars=c("cnv")) x = x[!is.na(x$value) & x$value != -1,] # drop missing / invalid RDCN (-1 sentinel) x$cn = round(x$value) if (su...
4539a2248f9eb69a056d8e1f05da6b33ceb1de3fb8d4540bc9af71440ded1e9f
R
1,078
29
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## header_infotext <- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exerc...
54638d1e7ae53abca04379c32281fbfc1f988c04158be4a628687c76054ed946
R
1,081
48
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_module_graph_ui <- function( id, label = "", title = "", info.text = "", caption = "", height, width ) { ns <- shiny::NS(id) PlotModuleUI( ns("plot"), ...
2eb9923d385c418d93742524528a0982112609781c7e9e1fbe6b32df30c8eba0
R
1,083
32
file_path <- file.choose() file_directory <- dirname(file_path) file_list <- list.files(path = file_directory, pattern = "\\.out$", full.names = TRUE) num_files <- length(file_list) results_list <- list() pb <- txtProgressBar(min = 0, max = num_files, style = 3) for (i in seq_along(file_list)) { file <- file_list[i] ...
bc14bcf2fda2cc613dc56ffeab4e524184880306e9c61d31b8d70ac0f02ad43f
R
1,085
63
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## GOOGLE_BASE_URL <- "https://firestore.googleapis.com/v1/projects" google_base_url <- function() { sprintf( "%s/%s/databases/(default)/documents/users", GOOGLE_BASE_URL, Sys....
5888f06a8f1d700f91b1661ebf12719209e795ad65a2377a1e554f30adccc5dd
R
1,087
32
file_path <- file.choose() file_directory <- dirname(file_path) file_list <- list.files(path = file_directory, pattern = "\\.out$", full.names = TRUE) num_files <- length(file_list) results_list <- list() pb <- txtProgressBar(min = 0, max = num_files, style = 3) for (i in seq_along(file_list)) { file <- file_list[i] ...
94584e0970b03fd0dc7751e784dadcef05057b4e29dad6b01ccddf500cf501aa
R
1,103
26
#' @title Calculate noise ratios #' @description Calculate noise ratios of a Repli-seq assay versus a Repli-seq control #' #' @param rs_assay a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx #' @param rs_control a Repli-seq control assay (data.frame) loaded with readRS() and...
c02d138c5d9057f0c21b139c7939afd6892e026312fab1b7ef85ab2f4b47aa8d
R
1,125
51
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_factorcorheatmap_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) PlotModuleUI( ...
0f601d2981c33b66152a29fa711bb2059a6a00e37555cef30e46e3549f4280a8
R
1,132
51
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## preservationWGCNA_plot_summaries_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) PlotModuleUI...
4a876c41c0388d2fc8b3f1369dbe785a36ef75dbce11f33ac75acfd9168b669f
R
1,134
37
library(coloc) options(stringsAsFactors=F) library(stringr) library(dplyr) library(data.table) cell<-commandArgs(trailingOnly = T)[1] chunk<-commandArgs(trailingOnly = T)[2] n<-sample_n # number of samples chunkfile<-read.table("/path/to/chunkfile.txt") colnames(chunkfile)<-c("chr","gene") data="ROSMAP" res<-data...
456101204a4791d840898d82a1e6d360096302072365297abf4040145366d839
R
1,142
50
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_MMvsGS_ui <- function( id, label = "", title = "", info.text = "", caption = "", height, width ) { ns <- shiny::NS(id) PlotModuleUI( ns("plot"), title...
e90cf598782b5f04b16e293a67059a5f67b9bebf857002b26b599fe890fb1864
R
1,168
26
#' @title Write Bedgraph files of Repli-seq assays #' @description writes one bedgraph file per fraction in the provided Repli-seq assay #' #' @param rs_assay a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx (or S0) #' @param path_file a path to the files to write #' @param ...
ba8ead6d1a3ce88e2193f2fca06cdaa5100c1e263b4b5ea4a9c4dc94094c41f5
R
1,169
52
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_heatmap_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) PlotModuleUI( ns("plot"...
3d093f77a925688fef517d3fbb315c0ff1e8595c681f43d39ab3f4e786f6ab3b
R
1,170
32
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## RDIR="../R" FILES="../lib" PGX.DIR="." dir.exists(PGX.DIR) source(file.path(RDIR,"pgx-functions.R"), local=TRUE) ## pass local vars source(file.path(RDIR,"pgx-api.R"), local=TRUE) ## pa...
ebbdda19ab47df6a90a7379ddeefbbc3720c40132b223bc433155ba8e6fc4642
R
1,185
49
## make as R6 class?? e.g. add documentation, initialize object, ## object id. MODULE.clustering <- list( ## MODULES[["multiomics"]] <- list( module_menu = function() { c( clustersamples = "Samples", clusterfeatures = "Features" ) }, module_server = function(PGX, labeltype = NULL) { inf...
defbc91f69d9f96495b88890926fdc8c598971bf6e3f6a532ae043f693d51f87
R
1,192
40
library(optparse) library(ChIPseeker) library(GenomicFeatures) library(rtracklayer) # Parse command line arguments option_list <- list( make_option("--peaks", type="character", help="Comma-separated list of peak files"), make_option("--output", type="character", help="Output file path"), make_option("--gen...
a3a4a34242f0a57112c182d1c02da7cf68b326d2754a8a5762a325c9518f3093
R
1,198
47
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## # Sass code compilation sass::sass(input = sass::sass_file("inst/app/www/custom.sass"), output = "inst/app/www/custom.css", cache = NULL) # Sass code compilation #sass::sass(input = sass:...
889415d1948bf8eee8e8f88627e5410f7d83fec68e643e4057176dd4d806a91d
R
1,200
35
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## DropdownMenu <- function(..., size = "default", status = "default", icon = NULL, circle = TRUE, border = "default", width = "") { id <- bigdash:::make_id() bslib::popover( tags$a( ...
84a15f87f6387d0ba5a24e2b326870a82e8ee0d2f882d570d8a9958143011044
R
1,203
33
drawPriorGamma <- function(data, col=NULL, xlim=c(-3,1.5), ylim=c(0,3)){ nn <- length(data$gamma.bar) if (is.null(col)){ col <- 1:nn } gamma.hat <- data$gamma.hat t2 <- data$t2 gamma.bar <- data$gamma.bar normal_data <- lapply(1:nn, function(i){rnorm(1000000, mean=gamma.bar[i], sd=sqrt(t2[i]))}) plo...
4e64c32f26fad438f0458427f02fbe16cef61f92e705e4f92876672fe36005e8
R
1,211
48
library(data.table) library(dplyr) library(LDlinkR) args = commandArgs(trailingOnly=TRUE) if (length(args)==0) { stop("enter path to a file with columns 'RSID' and 'POP' (EUR, EAS, ALL, etc) for each variant you want proxies for, and then the r2 cutoff value", call.=FALSE) } else if (length(args)==1) { file = a...
0f09c01ddf8b7b6ce26df4b0311bd46ad7dd494a234c1cfcc14b2fb37ba51d98
R
1,215
44
sink(snakemake@log[[1]]) library(data.table) library(assertthat) e <- fread(snakemake@input[["phased_states"]]) e d <- fread(snakemake@input[["info"]]) d g <- fread(snakemake@input[["initial_states"]]) g d$bam <- basename(d$bam) # Handle empty phased_states: ensure bam column is character type if (nrow(e) > 0) { ...
dc01607d2d515fbf36f9fcc87f812d59871e8ca12234a1779f8c1938a99f1463
R
1,223
18
######################################################################################################quote ### test_regions_BED.R: make bed file with regions including ### on-target site, 2 off-target sites without variants, ### 2 off-target sites with variants, and 1 region wi...
da39759586255f71542172919c58c0431ef29396c9b723aaa24014fdcc5ef063
R
1,240
25
#' @title Normalize Repli-seq assay #' @description Calculate Repli-seq assay count matrices after normalizing (dividing counts by ratios) #' #' @param rs_assay a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx #' @param norm_ratios an array with the ratios in the order of rs...
a8f606f832436555645f452b7b8bbd623d2822817e32bc07a22e57638ec52470
R
1,246
37
rm(list = ls()) library(Seurat) library(PRECAST) set.seed(1234) # The data with format required by PRECAST are available at: # https://drive.google.com/file/d/1g763Z7ClovTDn7aQXj4hJs6cxLFjvQAS/view?usp=sharing # load data data_path <- "data_for_R" load(paste0(data_path, "/DLPFC_4slices.RData")) obj@meta.data$row <...
03b3c9bc8cb365bde3513c0e269a7adaea2b5a35ade386be6d354e35f6f3a4dd
R
1,253
24
#' @title remove Noise #' @description Calculate Repli-seq assay count matrices after substracting noise #' #' @param rs_assay a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx #' @param rs_control a Repli-seq control assay (data.frame) loaded with readRS() and formatted as c...
30aa60f19a93c648f9cb4c578a58a66ee9977fe8b82f3812ac8f912c39a2861e
R
1,255
42
library(dplyr) library(data.table) install.packages("gwasrapidd") library(gwasrapidd) ##get top SNPs top_vars<- "file containing lead variants to be queried" var_list<- top_vars %>% dplyr::select(rsID) %>% distinct(rsID) var_list_array<- var_list$rsID # Initialize list to hold results by rsID results<- list() se...
6588bd08f34d6c6e7e0b637bed529a2d19e6b0d13c3b3ca7495a45a03e4f029c
R
1,263
60
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_covariate_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <- shiny::tagList...
c537b55d3e1a40b809673590d8de6a7e19d1e17c357c7dcdfe83a3bb7386fe76
R
1,266
34
#' @title Read Repli-seq assay data (bedgraph format). #' @description Bedgraphs with a one line header and with similar organization (same length and sorted) #' #' @param paths_data list of paths to repliseq fractions files #' @param fractions list of fractions names #' #' @return a dataframe composed of genomic coord...
e0ab7dae65f5da6e220ac4093701514ef73b34aec2b39f36ea151c2cffaa3eab
R
1,283
37
#' @title Calculate S50. #' @description Calculate replication timing S50 values from Repli-seq assay (data.frame) #' #' @param rs_assay a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx #' #' @return a dataframe composed of genomic coordinates plus S50 : chr,start,stop,S50 #...
9ed3a7570b943c7b7f7df631cebf93c516cbea506fa0449431a76caf215c54a5
R
1,290
33
# # Copyright (c) 2018 German Cancer Research Center (DKFZ). # # Distributed under the MIT License (license terms are at https://github.com/DKFZ-ODCF/AlignmentAndQCWorkflows). # # Rscript ${TOOL_INSERT_SIZE_PLOT_SCRIPT} ${FILENAMED} ${FILENAMEP}_qcValues.txt ${FILENAMEP} "PE insertsize of ${FILEINFO} (rmdup)" # Rscrip...
b8740229589e0fdf7d68041ad365caee8f4e1818f3c182e03e91e59a8c49fd16
R
1,292
47
library(DiffBind) library(tidyverse) library(BiocParallel) # Get the experiment name and number of threads from Snakemake experiment <- snakemake@wildcards[["experiment"]] threads <- snakemake@threads # Set up parallel processing register(MulticoreParam(workers = threads)) # Read sample sheet # Set DATA_DIR to your ...
bc943ea0303800232a67aea6aad60065cf89830072fb07a85547cd5bd949bb91
R
1,294
55
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_eigengene_clustering_ui <- function( id, label = "", title = "", info.text = "", caption = "", height, width ) { ns <- shiny::NS(id) options <- shiny::tagList...
87356d215aecedc4c0989451cb7deca93239fbc0f1ad98274bc9bc70d88de43c
R
1,323
32
#' Get response time quantiles #' #' @param dat data.table; choice and response time data #' @param qs numeric; vector of quantiles #' @param rt_var character; name of rt variable in data table #' @param conditions character vector; vector of columns indicating the conditions in which to calcluate rt quantiles #' #' @...
213daf534f8274051a12166da41bbaa522cb152ca25ed5941c6eae2de4403df7
R
1,330
28
#!/usr/bin/env Rscript library( optparse ) # Command line arguments pArgs <- OptionParser( usage = "%prog [options]" ) pArgs <- add_option( pArgs, c("-i","--input_matrix"), type="character", action="store", dest="str_input_matrix", metavar="Input_matrix", help="Input genotype matrix to visualize." ) pArgs <- add_optio...
3ecef2e384574acc03bf878c3ea5d550b581bbd3c8a19bbbe3b5b26ff172c2da
R
1,340
55
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## plot_deepnet_lossplot_ui <- function( id, title = "", info.text = "", info.methods, info.references, caption = "", label = "", height = c("100%", TABLE_HEIGHT_MODAL), wid...
068c12e087a0dfea6ad51a0b2f9b751e0c3174915b378a5162788ab1a6e9fb16
R
1,341
55
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_loadingheatmap_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) PlotModuleUI( ns...
5aaba68a749ef0767ee1e158e1dcbf6492e016117104c61cb2d7ab17cd52672f
R
1,342
53
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## ui.startupModal <- function(id, messages, title = NULL) { if (length(messages) == 0) { return(NULL) } header <- sapply(strsplit(messages, split = ":::"), function(m) m[[1]]) m...
58641e9189787edb30435b5b4cfcd746a3f4de61427b8cdeba3cf9e263cc0c86
R
1,352
38
file_path <- file.choose() file_directory <- dirname(file_path) file_list <- list.files(path = file_directory, pattern = "\\.out$", full.names = TRUE) num_files <- length(file_list) results_list <- list() pb <- txtProgressBar(min = 0, max = num_files, style = 3) for (i in seq_along(file_list)) { file <- file_l...
5cab346d59dc887d4a84fd3770dc5f37f07f829e3b70f2a474505040cb88a62c
R
1,358
38
library(diceR) ## Hyperparameters Image_Name <- "1_-0.14" #Import data. LastStep_OutputFolderName <- paste0("./Step2_Output_", Image_Name, "/") NodeMask <- read.csv(paste0(LastStep_OutputFolderName, "Run1/NodeMask.csv"), header = FALSE) nonzero_ind <- which(NodeMask$V1 == 1) #Find the file names of all soft TCN as...
9675d4246cf6e3874e383b73d1d7a6581b0370ed249a845252e227803799b3ae
R
1,358
60
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_gdendogram_ui <- function( id, title = "", label = "", info.text = "", caption = "", height = 400, width = 400, ... ) { ns <- shiny::NS(id) options <- shiny...
195d1e7e819085b434c0890ba53d205b5996e0c5e820e83e997c97cff34fe05b
R
1,373
45
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## # Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R s...
73b2953d605f79a5220a85a22dcd50db0913b222697211a5189c08710f9f317f
R
1,377
44
rm(list = ls()) library(Seurat) set.seed(1234) # The data with format required by Seurat are available at: # https://drive.google.com/file/d/1g763Z7ClovTDn7aQXj4hJs6cxLFjvQAS/view?usp=sharing # load data data_path <- "data_for_R" load(paste0(data_path, "/DLPFC_4slices.RData")) obj.list <- SplitObject(obj, split.by...
af785f4aee3027c3d3254999f43ec9fda4f289c4da37b792b9569d61a57e948a
R
1,398
49
pbmc3k <- local({ # Check that we're running during package build callcheck <- "resave_data_others" %in% unlist(x = lapply( X = sys.calls(), FUN = as.character )) if (!isTRUE(callcheck)) { return(NULL) } # Check required packages if (!requireNamespace("Matrix", quietly = TRUE)) { return(...
91855cf3b7c14ad2494f018920c982b6b7e9a18f754ef862d96dd94df4b94536
R
1,408
45
dist_matrix = function(x, by.row = FALSE) { # Create a matrix and transpose if by row x = as.matrix(x) if (by.row == FALSE) { x = t(x) } # Make distance matrix m = matrix(nrow=nrow(x), ncol=nrow(x)) diag(m) = 0 colnames(m) = rownames(x) rownames(m) = rownames(x) ...
c21abf9462ac0891b64580e4260cfb06228a9318d23ed7eaf693b6b3720dd8c6
R
1,413
42
rm(list = ls()) library(Seurat) library(rliger) set.seed(1234) # The data with format required by LIGER are available at: # https://drive.google.com/file/d/1g763Z7ClovTDn7aQXj4hJs6cxLFjvQAS/view?usp=sharing # load data data_path <- "data_for_R" load(paste0(data_path, "/DLPFC_4slices.RData")) obj@meta.data$row <- a...
2fe73c8956eb969152e06ebb350f18027db2a652d29661fb193ac6cb0dd2aad9
R
1,427
25
rm(list= setdiff(ls(),c('params','grp'))) ##################### ### Test accuracy ### ##################### tp <- c(1,3,6) tf = 0.5 load(file = paste(params$opdir,'diffmodel/traintest/',grp,'testfits',tf,'.RData',sep='')) n.reps <- length(r.SC) test.accuracy <- t(do.call(what = 'cbind',args = r.SC)) load(file = paste...
e372b7126aa32f667c5f00252efb815a3cc85d296c20b9c25a24c7aa9f0a1627
R
1,428
53
# ========================================================= # Environment setup for WGBS analysis # ========================================================= cat("Initializing environment...\n") # ----------------------------- # 1. Load packages # ----------------------------- required_pkgs <- c( "tidyver...
07b6766cdb1d6b181f9faa34822ddbd264ed1fc25a1c54f290dc3448f97d46fa
R
1,433
63
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_TOMheatmap_ui <- function( id, label = "", title = "", info.text = "", caption = "", height = 400, width = 400, ... ) { ns <- shiny::NS(id) PlotModuleUI( ...
bad3349b521d7ddb13195f11406e707c5d2f904b387ec796e778baa7d0ed74f3
R
1,434
76
# ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## MODULE.systems <- list( module_menu = function() { c( drug = "Drug connectivity", tcga = "TCGA analysis", cell = "Single cell", pcsf = "Protein networks" )...
f025ce36371187786b8b3f031fe3a6b7177e19c3d9c89a1da3549be6a239258f
R
1,457
50
#!/usr/bin/env Rscript if (commandArgs()[1] != "RStudio") { ARGS <- c( "tlxfile", "character", "", "bedfile","character","", "output","character", "" ) OPTS <- c( ) source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE) base_dir <- dirname(substring(argv[grep...
2df406f8e75d67caff358d93d6788a03c9607db3e7a2345e408ae27bda511764
R
1,463
43
#!/usr/bin/env Rscript # # This file is part of the AlignmentAndQCWorkflow plugin. # # This script is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 or 3 of the License. # # This script is distr...
96540d3fb8c4e219226b1e68a4c897cf1da507120eddfe677da59db0557e78b0
R
1,468
53
# !/usr/bin/env Rscript ## #!/usr/bin/env Rscript # Sys.setenv(Renv='PWD') # Rscript version updated according to README 30-Mar-22 commit 69c9fb4 # Long time execution : ~20 min # install.packages("devtools", repos = "http://cran.us.r-project.org") library(devtools) # if (!requireNamespace("BiocManager", quietly=TR...
c98b84f97dcb5684182a5132db234541b8508d7194aa8f67f50fec8c841b440b
R
1,493
66
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_snf_heatmap_ui <- function( id, title = "", info.text = "", info.methods = "", info.references = "", caption = "", label = "", height = 400, width = 400 ) { n...
582b0e2b81ae0d20410261305d58ab7f63c996ba3cf4e7aeb331832f2af315ec
R
1,498
61
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_centrality_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) PlotModuleUI( ns("pl...
84069e5a3923c5254f40f51ae48ea855a57976b456ebf9439dab7b9c45b7b3d0
R
1,499
34
# sink(snakemake@log[[1]]) library(data.table) library(assertthat) source("utils/mosaiClassifier/mosaiClassifier.R") # Currently read files from the Snakemake pipeline counts <- fread(paste("zcat", "/g/korbel2/weber/MosaiCatcher_output/Mosaicatcher_output_singularity_LCL-TALL/counts/H2NCTAFX2_GM20509B_20s000579-1-1/H...
b39d9bec69f7f9b1a81aad360edfe49b7349cf50ee4879f6d5ee32db246d4cc8
R
1,499
24
options(warn = 2) # treat warnings as errors, otherwise script can fail silently if a package fails to install InstallPackageFromArchive = function(packageName, packageURL) { # make sure to use http not https as this will give an "unsupported URL scheme" error if (!(pack...
cb4ee2f964464808ddf43ad3960c87f50c7a744cc8f48f73743eb71476e1dca3
R
1,499
58
#' returns the hapotyoe name #' #' @param hap.code The haplotype coding #' @author Maryam Ghareghani #' @export #' get_hap_name <- function(hap.code) { hap.codes <- c("1010", "0010", "1000", "0000", "0110", "1001", "0101", "2010", "1020", "2020", "1110", "1011") hap.names <- c("ref_hom", "del_h1", "del_h2", "del...
81002bbe7d8bb4f204f2ef2e1f080932117d6dc4ebca450a0e4004a7daf62194
R
1,512
64
pbmc3k.seurat.counts <- local({ callcheck <- 'resave_data_others' %in% unlist(lapply( X = sys.calls(), FUN = as.character )) if (!isTRUE(callcheck)) { return(NULL) } # Check required packages pkgcheck <- requireNamespace('rprojroot', quietly = TRUE) && requireNamespace('Matrix', quietly = ...
ece7efdc117bda65fc6afa3898672d7095847827c61b0db688ea106544056e1e
R
1,514
69
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## MODULE.compare <- list( module_menu = function() { c( isect = "Compare signatures", comp = "Compare datasets", cmap = "Similar experiments" ) }, module_ui =...
2c138947e6918fc5f5876400f836b42e51d5fbf29ed24f508b598b3b22b0f6e5
R
1,520
67
# ========================== # 0. Libraries # ========================== library(dplyr) library(data.table) # ========================== # 1. Paths # ========================== # 输入(processed data) dmr_file <- file.path(data_processed_dir, "DMR_full_results.tsv") # 输出(analysis层) ou...
d952095e86a5bc1b4ac14a902b7d92763030eee9785e6333283a0279a2cc4a29
R
1,521
68
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## admin_module_info_ui <- function( id, label = "", title, height, width = c("auto", "100%"), caption, info.text ) { ns <- shiny::NS(id) PlotModuleUI( ns("mod"), ...
0e90fa6d268e98b558983f6dee4d2df812f565c2bd998b4ad062204dd5f8dc1c
R
1,522
57
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_correlation_network_ui <- function( id, title = "", info.text = "", caption = "", label = "", height, width, ... ) { ns <- shiny::NS(id) PlotModuleUI( n...
1f485f1ca6eee66f01940d04d13781f5cc880c05d4319ee4748a0aebf16eb3d2
R
1,523
39
# https://scholar.google.com/scholar?q=%22fiber+photometry%22&hl=en&as_sdt=0%2C21&as_ylo=2014&as_yhi=2014 years <- 2014:2022 t <- 1:length(years) refs <- c(6, 27, 71, 137, 240, 372, 532, 614, 879) # 549 add_nls <- nls(refs ~ a*exp(r*t), start = list(a = 20, r = 0.5)) # estimates are very stable for re...
a369772664a5aac87a11405173a3b54ca36d18f9c092f7f2aa63847d0b0ad89a
R
1,524
68
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## preservationWGCNA_plot_dendrograms_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <-...
9a9f5a36aa49e77790e0e05b054acabe20a29c6302e2c2dc450f6d87dc22c62c
R
1,537
66
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_sampledendrogram_ui <- function( id, title = "", label = "", info.text = "", caption = "", height, width ) { ns <- shiny::NS(id) PlotModuleUI( ns("plot"),...
5739eb721930156e80dadf774b891567d36657c8a842d254281db615e7376e04
R
1,541
72
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_topgenes_ui <- function( id, label = "", title = "", info.text = "", caption = "", height, width ) { ns <- shiny::NS(id) PlotModuleUI( ns("plot"), ti...
33450af05ea29e1b42c0595494d200fb7a6124eb5b6ff7de4301820ce196ca73
R
1,544
73
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## preservationWGCNA_plot_overlap_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) ## options <- ...
5b3c01f7d631e3b949a80f3b0bcb85cf4eb80bba7d94803871b7da6174c21fd4
R
1,563
44
#' Get simulated responses and rts from first passage time density #' #' @param fpt matrix; 2 X time points matrix with first passage time for upper and lower boundary crossings #' @param dt numeric; size of time bins used to calculate first passage time density, default = .01 #' @param n integer; number of trials to ...
5a7c8bd8f4af100ad1d8847c866643d3649c8865e518a11ca1e2d461d47df9d1
R
1,601
70
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## admin_module_status_ui <- function( id, label = "", title, height, width = c("auto", "100%"), caption, info.text ) { ns <- shiny::NS(id) PlotModuleUI( ns("mod"), ...
377456d3f6cf3c1dc255f48f9f60b48e7b90bd660b2e63f688753fcd0b2396f3
R
1,609
76
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## consensusWGCNA_plot_traitsignificance_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options...
52625a1473c3a6b5d4d89fe238f8bc07ba2467a0ef7e7c129e507ac80cb2bd76
R
1,616
53
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## # Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R s...
2f27a94b1e69d05ccca575d70107617996326c46ed45e92045aec5966b69a331
R
1,618
58
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## if(interactive()) { library(shiny) ## RUN FROM root folder! source("shiny/global.R") ## global variable source("shiny/modules/plotModules/examplePlotModule.R") ## exampl...
36b21ee9ad253852191119243add1b8d40e0a7912b97a35e0c8bcf24ffc3cb02
R
1,619
71
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_factortrait_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <- shiny::tagLi...
6895055873755b5ef78f6d31f75e738b00f2152c059c297e3fde50dbf25eb874
R
1,620
56
library(pracma) library(progress) library(foreach) library(doParallel) # vip_null_R <- function(x, y, perm, lv_for_vip) { # m <- nrow(y) # n <- ncol(y) # tmp1 <- matrix(0, ncol(x), perm) # for (i in 1:perm) { # ind <- sample(m, m, replace = FALSE) # X1_r <- x[ind, ] # result_pl...
9b5549485cda9f7d43a4765db537a545b044259364c1effe4a5adb8f8db21a94
R
1,620
75
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## preservationWGCNA_plot_traitsignificance_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) opti...
14f3dd5b8e8cff05806b96e06aae77158883c845b4aecf60fa6456847e5e2c03
R
1,631
67
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_module_significance_ui <- function( id, label = "", title = "", info.text = "", caption = "", height, width ) { ns <- shiny::NS(id) PlotModuleUI( ns("plot...
be72ff4285cab0fdb0915642dd6e02c9e752eb3c59872505c76f9fef070819bc
R
1,644
70
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## wgcna_plot_gclustering_ui <- function( id, label = "", title = "", info.text = "", caption = "", height = 400, width = 400, ... ) { ns <- shiny::NS(id) options <- shin...
666cef0a6fd5fd214d4a6573231d5b2fea21cbbcbcca127456a0229d77b1bb4f
R
1,651
73
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## multiwgcna_plot_power_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <- shiny::tagLi...
1b7c6944309711331741b90a9aa565414c00afa81c378ce974df576e68af8ef4
R
1,657
40
#' @title calculate URI #' @description Calculate the under replication index of two compared Repli-seq assays #' #' @param rs_x a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,stop,S1,...,Sx #' @param rs_y a Repli-seq assay (data.frame) loaded with readRS() and formatted as chr,start,sto...
270a584d2e1f8826c88d17dba1627820e5cfe858944c9eca034abafb0a290e46
R
1,657
46
rm(list=setdiff(ls(),'params')) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'processed/',sep='') dir.create(savedir,recursive=T) load(paste(params$opdir,'processed/pathdata.RData',sep='')) # load path data and ROI names ##################################### ### Tract tracing connectome onl...
24c3f30a3cff9e18bf81aafc9e2021c6b464a47c46eac636e5bcaaf35403d347
R
1,671
74
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## consensusWGCNA_plot_power_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <- shiny::t...
06a70e15eca67318edcf01f3e06ccf0c81a5f8a89b35aa7a76a52457a54fa024
R
1,683
75
## make as R6 class?? e.g. add documentation, initialize object, ## object id. MODULE.expression <- list( ## MODULES[["multiomics"]] <- list( module_menu = function() { c( diffexpr = "Differential expression", timeseries = "TimeSeries", corr = "Correlation analysis", bio = "Find biomark...
34a9cefb22d6fee65354c462b391772188d43351524fc5e741bde08d001e4e6b
R
1,683
74
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## preservationWGCNA_plot_power_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <- shiny...
d60166e6da478e5eb5a4f2399fff45c002700cd31fc8682ace10f472e1bf1b9b
R
1,688
72
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## mofa_plot_factorgraph_ui <- function( id, title = "", info.text = "", caption = "", label = "", height = 400, width = 400 ) { ns <- shiny::NS(id) options <- tagList( ...