sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
cce2304e09f0953adc115436cd3325ecb6574fb147e887e518df87dc74d933a5
Quarto
3,559
73
# cmd { #kimmdy.cmd } `cmd` Functions for starting KIMMDY either from python or the command line. Other entry points such as `kimmdy-analysis` also live here. ## Functions | Name | Description | | --- | --- | | [entry_point_kimmdy](#kimmdy.cmd.entry_point_kimmdy) | Run KIMMDY from the command line. | | [get_cmdline...
c03a829094c66bf746a81f64b7bf83ffe8ca32caa132b56e4d3400fec82a8e7f
Quarto
3,582
98
# plugins { #kimmdy.plugins } `plugins` Plugin base classes and basic instances thereof. Also discovers and loads KIMMDY plugins. ## Classes | Name | Description | | --- | --- | | [BasicParameterizer](#kimmdy.plugins.BasicParameterizer) | reconstruct base force field state | | [ReactionPlugin](#kimmdy.plugins.Reac...
f7fec0bc8a7b07c773072b7e13f3c81c9ca453f17674c77ccd973c22ebcc21fb
Quarto
3,583
103
# utils { #kimmdy.utils } `utils` Utilities for building plugins, shell convenience functions and GROMACS related functions ## Attributes | Name | Description | | --- | --- | | [TopologyAtomAddress](#kimmdy.utils.TopologyAtomAddress) | Address to an atom in the topology. | ## Functions | Name | Description | | --...
6fcecfa3c1916f89b3f51e689fea9d99d6c8ec5cf65f026190b8ee6f80ebfc64
Quarto
3,893
121
--- title: "Contribute" subtitle: "How to contribute to KIMMDY" --- ## Setup See [Installation](./install-kimmdy.qmd). For new plugins, make a separate repo, and add your entrypoint in the `pyproject.toml` to the `kimmdy.reaction_plugins` entrypoint: ```pyproject.toml [project.entry-points."kimmdy.reaction_plugin...
49d2d998cb909a7af4d33df3874a1c4f33900499c60c8b4bb4579c9b2151d78b
Quarto
4,363
83
# runmanager { #kimmdy.runmanager } `runmanager` The Runmanager is the main entry point of the program. It manages the queue of tasks, communicates with the rest of the program and keeps track of global state. ## Classes | Name | Description | | --- | --- | | [RunManager](#kimmdy.runmanager.RunManager) | The Runma...
42b1f7f1f8df044bc90b1fa00e5852a749ea2724c0db650238d7657b028e4a78
Quarto
4,926
103
# tasks { #kimmdy.tasks } `tasks` The tasks module holds the TaskFiles class which organizes input and output paths and the Task class for tasks in the runmanager queue. ## Classes | Name | Description | | --- | --- | | [AutoFillDict](#kimmdy.tasks.AutoFillDict) | Dictionary that gets populated by calling get_missi...
134a4cd4bdff4f935d5c66ee662aedc6964400a4fc35fa08eee7a42fa30049bf
Quarto
5,534
158
# coordinates { #kimmdy.coordinates } `coordinates` coordinate, topology and plumed modification functions ## Classes | Name | Description | | --- | --- | | [AffectedInteractions](#kimmdy.coordinates.AffectedInteractions) | keeping track of affected interactions during the merge process to add the correct helper pa...
dfe87d9e4e0946496c8725f3710e8e1dc8840e338d193e2cadd449ab719b4582
Quarto
5,588
206
--- title: Get Started resources: - './getting-started-files/*' image: ./img/getting-started-vmd-radicals.png author: Jannik Buhr categories: - user --- In this tutorial we will be simulating hydrogen atom transfer in a simple ACE/NME-capped Alanine molecule in a box of water. ## Installation ### Prerequisites ...
5ad1be3dcb0c11349fe72a241ad67274fb3fe7a60f8f7a7c36aa06500c756a18
Quarto
6,064
241
--- title: | Release Notes: \ Omics Playground v3.5.0 subtitle: "`r readLines('../VERSION')`" author: "BigOmics Analytics Inc." date: today date-format: "MMMM YYYY" license: "Dual Licensed" copyright: holder: BigOmics Analytics year: 2024 format: pdf: documentclass: scrreprt papersize: a4 fontsi...
35700000814fa4bf4e6c479ebe364d3717f39b0cec2c8c421710e6683719d9ae
Quarto
6,429
181
--- title: Write a Reaction Plugin description: In this tutorial, you will learn how to create your own reaction plugin in a GitHub repository. execute: eval: false code-fold: true author: Eric Hartmann categories: - developer --- ## Creating a GitHub repository By creating a GitHub repository, you have version c...
9f3d7b6b7ea4c1401b74529b4129d6f10ff6ba0f28924baec24819ee43488670
Quarto
7,186
120
--- title: Modify a Topology resources: - './modify-topology-files/*' image: ./img/getting-started-vmd-radicals.png author: Eric Hartmann categories: - user --- In this tutorial we will check out different ways to process GROMACS topology files with the command-line interface `kimmdy-modify-top`. Use `kimmdy-modif...
e5b9b784dea7593d0a597d50bc43c73550df704166f288ca1d5a9af7415ccd8f
Quarto
7,577
146
# tools { #kimmdy.tools } `tools` Standalone tools that are complementary to KIMMDY. ## Functions | Name | Description | | --- | --- | | [build_examples](#kimmdy.tools.build_examples) | Build example directories for KIMMDY from integration tests. | | [edgelist_to_dot_graph](#kimmdy.tools.edgelist_to_dot_graph) | Co...
cfeeb0dd6f6fc9a617bb2cbd67d9ebcdff275433169a4994a5056f8eb59ac6c0
Quarto
7,821
167
# topology.utils { #kimmdy.topology.utils } `topology.utils` ## Functions | Name | Description | | --- | --- | | [get_is_reactive_predicate_f](#kimmdy.topology.utils.get_is_reactive_predicate_f) | Returns whether a moleculetype name is configured to be recognized as reactive. | | [get_is_reactive_predicate_from_co...
f80e2d1c6cbbb1d306effb8c54f3c4942169faf2726fc584c80b32a940450070
Quarto
8,416
234
--- title: Run KIMMDY from Colbuilder fibril author: Eric Hartmann image: ./img/colbuilder.png categories: - user --- In this tutorial we will download a collagen fibril from [colbuilder](https://colbuilder.h-its.org/) and run a KIMMDY simulation on it. ## Preparation - Download the desired model and the ff parame...
a33e2922380d618ec0a937e4cb71a567d8331f655bc46b5a3a64b782ec612838
Quarto
9,905
169
# kmc { #kimmdy.kmc } `kmc` Kinetic Monte Carlo (KMC) classes and functions. In our system, the reaction rate r = (deterministic) reaction constant k = stochastic reaction constant c (from gillespie 1977) = propensity a (from Anderson 2007) because of the fundamental premise of chemical kinetics and because we have ...
031b964cac8876737651cd7a885a13bb9bd7dc58e75bbe81d12e6108c7cb2cca
Quarto
11,139
453
# topology.atomic { #kimmdy.topology.atomic } `topology.atomic` Atomic datatypes for the topology such as Atom, Bond, Angle, Dihedral, etc. The order of the fields comes from the gromacs topology file format. See [gromacs manual](https://manual.gromacs.org/current/reference-manual/topologies/topology-file-formats.htm...
f2d079feec1f58c64ca01e63a35a8e53917fe39755ee165359a47bb4baeb08aa
Quarto
11,371
317
# parsing { #kimmdy.parsing } `parsing` All read_<...> and write_<...> functions. ## Attributes | Name | Description | | --- | --- | | [TopologyDict](#kimmdy.parsing.TopologyDict) | A raw representation of a topology file returned by [](`~kimmdy.parsing.read_top`). | ## Classes | Name | Description | | --- | --- ...
43ca4b041aae08cf4a4aa191755f04c29b6c89c334e370bb4cc60686d72e4a96
Quarto
11,787
198
# analysis { #kimmdy.analysis } `analysis` Analysis tools for KIMMDY runs. For command line usage, run `kimmdy-analysis -h`. ## Functions | Name | Description | | --- | --- | | [concat_traj](#kimmdy.analysis.concat_traj) | Find and concatenate trajectories (.xtc files) from a KIMMDY run into one trajectory. | | [en...
aae180597e6a8cf7b013233977db6f4a96382fbac913d0e5f5007a82d3ed7229
Quarto
14,882
249
# topology.topology { #kimmdy.topology.topology } `topology.topology` ## Classes | Name | Description | | --- | --- | | [MoleculeType](#kimmdy.topology.topology.MoleculeType) | One moleculetype in the topology | | [Topology](#kimmdy.topology.topology.Topology) | Smart container for parsed topology data. | ### Mol...
3a1f48eab9a02ff4dff9ebf884dca4178fb872d3578685163dcd7a022b9e13b1
Quarto
15,407
202
--- title: "Supplementary Material" date: 2026-04-15 engine: knitr bibliography: bibliography.json csl: styles/nature-brackets.csl css: styles/styles.css format: html: toc: true code-fold: true embed-resources: true execute: echo: false warning: false message: false crossref: ...
49574ab153fa374883829f708d474935c4ee45f6a42b41d9ba0a93fdb682654f
Quarto
16,338
337
# recipe { #kimmdy.recipe } `recipe` Contains the Reaction Recipe, RecipeStep and RecipeCollection. ## Classes | Name | Description | | --- | --- | | [Bind](#kimmdy.recipe.Bind) | Change topology to form a bond | | [BondOperation](#kimmdy.recipe.BondOperation) | Handle a bond operation on the recipe step. | | [Brea...
fb07c7fbcf2d7a29530bb48a555c3f8ab237aa91a150a80be559f55630291919
Quarto
37,578
218
--- title: "Predicting Post-Stroke Functional Outcome Using Explainable Machine Learning and Integrated Data" date: 2026-04-15 author: - name: Jesper Olsson orcid: 0009-0000-3920-3874 id: jo email: jesper.olsson@gu.se affiliation: Department of Laboratory Medicine, Institute of Biomedicine, Sa...
ac35ac26d20723e1cc7fb07edea10b364d0839a3dd60c29303bd32b0a1e7f488
Quarto
51,080
29
--- title: Components of KIMMDY author: Kai Riedmiller --- Here is an overview of the most important components of KIMMDY, and how they interact with each other: <div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{&quot;highlight&quot;:&quot;#0000ff&quot;,&quot;nav&quot;:true,&quo...
9fefac2965046d6e39894147df3ef32cee41742b1605a93f8e5220a7a5d177d4
R
53
1
shiny::runApp("/home/s215v/Workspace/HTGTS/QCReport")
dc7c6f2eb0bb5b6d7130f30c66a89990e6e37868a3dac747241da1e411975f56
R
59
1
## See .../board.clustering/R/__init.R (for the moment..)
f7f72cbcd480dc1a7f91846dbdad06e3cd6102e1c0d8bdd054fab77658fd9f4a
R
85
2
# Load application support files into testing environment shinytest2::load_app_env()
70c787ab6cce44cf2a406dbf9c20319bfeea4279d585590ba12914d6a49c4830
R
87
6
#' @keywords internal "_PACKAGE" #' @useDynLib rddm #' @importFrom Rcpp sourceCpp NULL
29eabaf5a65eae4760fd500e7e3bd45ec6867317a8bd4c02cc23677f06b35aa6
R
152
9
library(ggplot2) library(stringr) library(R.matlab) library(cowplot) library(expm) library(viridis) library(RColorBrewer) library(lm.beta) library(mgcv)
dae888f1108f5c98c2ffc66a23411daa88e851cbccc01e070525e916248e6a3e
R
154
6
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## shinytest2::test_app()
3b35d8f7c0c926fbdafe0a90b9d45b948ee4d70266ac2cbedefc97bf296329b2
R
208
7
#log <- file(snakemake@log[[1]], open='wt') #sink(file=log, type='message') #sink(file=log, type='output') source("utils/count_add_peakind.R") count_add_peakind(inputfile = snakemake@input[["count_sort"]])
f22519470a5b9ceddff1f40069b034fa259c9bdac77abb3956e85a9938850e5b
R
221
8
auto_R <- function(x){ library(matrixStats) m <- nrow(x); n <- ncol(x); mx = colMeans(x); stdx = colSds(x); ax = (x-t(matrix(1, ncol(x), nrow(x))*mx)) / t(matrix(1, ncol(x), nrow(x))*stdx); return(ax) }
a2fde9d17a9bf5436cc18e7d6a4b7398cf789cbbc160a2b3a25b271b5c345fdc
R
233
8
vip_R_v2 <- function(w, r2) { k <- nrow(w) a <- ncol(w) # library(SuperPCA) source("workflow/scripts/scNOVA_scripts/script_PLSDA/normc.R") vip <- sqrt(rowSums((normc(w)^2) %*% diag(r2)) / sum(r2) * nrow(w)) return(vip) }
f2f46533ae53b57cd70291f540b99e627798e460ea9b8d7c50ad0a890ea7e8ba
R
238
5
data_r <- as.matrix(read.csv("data/testdata_combat_r.csv")) data_matlab <- as.matrix(read.csv("data/testdata_combat_matlab.csv", head=FALSE)) tol <- 10e-14 similarity <- sum(data_r-data_matlab<tol)/ncol(data_r)/nrow(data_r)*100 similarity
f81aad1266ebd3dca0ee063316d941b3f3959e5c1434ef97ea4bf04d0278f297
R
247
7
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 asMatrix <- function(rp, cp, z, nrows, ncols) { .Call('_SCP_asMatrix', PACKAGE = 'SCP', rp, cp, z, nrows, ncols) }
acec508b73b63382d7f140a7a0be797119c0e941a7ab0adc343a42b05d0e4ee0
R
258
14
setwd('components/app/R') source('global.R') source('ui.R') source('server.R') shinyApp( ui = app_ui, server = app_server, uiPattern = '.*', options = list( launch.browser = TRUE, host = "0.0.0.0", port = 3838 ) )
7b8aec563958e20a7b93315c8ad86282286a81f05598d47e4b71270ba5ba786a
R
259
14
setwd('components/app/R') source('global.R') source('ui.R') source('server.R') shinyApp( ui = app_ui, server = app_server, uiPattern = '.*', options = list( launch.browser = FALSE, host = "0.0.0.0", port = 3838 ) )
ee92bcded41a27e74694f18dd15b82b9f6e070f6d5d08297d022bf1d212e524f
R
281
6
if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager", repos = "http://cran.us.r-project.org") } BiocManager::install("BSgenome.Hsapiens.UCSC.hg38", update = FALSE) # BiocManager::install("BSgenome.Hsapiens.UCSC.hg19", update = FALSE) quit(save = "no")
d1d321bc9fa388ba3bc3150deb00d106073cabda9ecf6d99f130615ef35fa7e3
R
293
8
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## if(requireNamespace('spelling', quietly = TRUE)) spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE)
011e2d80411e6093ab1e59089311f3848aa0a8f703eacee0d0ee2afc1f2f23c6
R
294
8
nrow <- 10000 ncol <- 10 data <- matrix(rnorm(nrow*ncol), nrow, ncol) # Let's introduce a biological effect: data[,c(1,3,5,7,9)] <- data[,c(1,3,5,7,9)]+3 # Let's introduce a batch effect: data[,6:10] <- (data[,6:10]+5)*1.5 write.csv(data, quote=FALSE, file="data/testdata.csv", row.names=FALSE)
8c0c9bc6bd282dd447ab210dbb15fd7fed949bcb703abf6ae94e710e6c9c16cd
R
328
8
library(scRNAseq) tasic = TasicBrainData(ensembl = FALSE) tasic$study_id <- 'tasic' Matrix::writeMM(Matrix::Matrix(counts(tasic),sparse=T),'tasic_counts.mtx') write.table(rownames(tasic), 'tasic_genes.csv',row.names = F,col.names = F,quote=F) write.csv(colData(tasic)[,c('study_id','primary_type')],'tasic_col.csv',quot...
33598933841d47aaac7a2b64593701a20dcfcd1c519ad50eaae6613f22881066
R
332
12
package <- snakemake@input[["tarball"]] is_package_available <- require(package) if (!isTRUE(is_package_available)) { if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager") } BiocManager::install("GenomeInfoDbData", update = FALSE) install.packages(package) quit(sav...
6372f757e4e00b6a96d38b07ea717ec45e77744a57e1af473f5bcbc826122458
R
333
10
sink(snakemake@log[[1]]) library(data.table) d <- fread(snakemake@input[["states"]]) e <- fread(snakemake@input[["info"]]) e$bam <- basename(e$bam) f <- merge(d, e, by = c("sample", "cell"))[class == "WC", .(chrom, start, end, bam)] write.table(f, file = snakemake@output[[1]], quote = F, row.names = F, col.names = F...
3a0adebc131e055a160db898e7f44d4f7f5dfc4f58c5c76f01fc55f51330e809
R
335
15
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## output <- sass::sass( sass::sass_file( 'scss/main.scss' ), cache = NULL, options = sass::sass_options( output_style = "compressed" ), output = 'components/app/R/www/sty...
1f90bc0a11cdb4eb40ef17999c076a7ea4d4f985aee87cd398b0754b655f4fa6
R
341
7
log <- file(snakemake@log[[1]], open = "wt") sink(file = log, type = "message") sink(file = log, type = "output") source("workflow/scripts/plotting/sv_consistency_barplot.R") SVplotting(inputfile = snakemake@input[["sv_calls"]], outputfile.byPOS = snakemake@output[["barplot_bypos"]], outputfile.byVAF = snakemake@outp...
e9a8fb48e06101a52dd569d93d4091ea1fa7b8675ad6d35918a88ef540a76300
R
367
8
args=commandArgs(trailingOnly=TRUE) NO_table <- read.table(args[1], header=T, sep ='\t', comment.char = "") GB_matrix <- read.table(args[2], header=T, sep ='\t', comment.char = "") NO_table_annot <- cbind(NO_table[,1:3], GB_matrix$name, NO_table[,4:ncol(NO_table)]) write.table(NO_table_annot, args[3], row.names = TRU...
cf67b7d2c1cae630c5332bddca93bc5ab7809d99e63d385e243467420265e6f6
R
374
13
#!/usr/bin/Rscript options(error = traceback) args <- commandArgs(TRUE) # add user defined path to load needed libraries # .libPaths(c(.libPaths(), args[6])) suppressPackageStartupMessages(library(breakpointR)) breakpointr( inputfolder = args[1], outputfolder = args[2], configfile = args[3] # WCregions = arg...
eed539bee67bfbb388823a4d2e252737ae78482de0d10ecb04854599f7d65771
R
382
8
source("/g/korbel2/weber/workspace/mosaicatcher-update/workflow/scripts/plotting/plot-clustering.R") traceback() plot.clustering( inputfile = ".tests/data_CHR17_NEW/RPE-BM510/mosaiclassifier/sv_calls/stringent_filterTRUE.tsv", bin.bed.filename = "workflow/data/bin_200kb_all.bed", position.outputfile = "TEST...
04f0d1b83ddab7cbddd2455b5a85062773a9f1e1eb24801105404f7b4ab3634a
R
386
15
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## library(shiny) ## RUN FROM root folder! ##setwd(pkgload::pkg_path()) setwd("~/Playground/omicsplayground") source("components/00SourceAll.R",chdir=TRUE) ## global variable load("data/ex...
be866ff2bca29e5f245654f8eed7c0e49724043bbed76e7774697fd4bd70bc9f
R
392
21
library(scTRIPmultiplot) args <- commandArgs(TRUE) counts_path <- args[1] haplo_path <- args[2] sv_path <- args[3] chromosome <- args[4] cell_id <- args[5] savepath <- args[6] scTRIPmultiplot::generate_multiplot( counts_path = counts_path, haplo_path = haplo_path, chromosome = chromosome, cell_id = ...
a96ab98a5be730b935f3efc783c00a8724ee44dccf8548aa284fa8e99249edf6
R
396
12
log <- file(snakemake@log[[1]], open='wt') sink(file=log, type='message') sink(file=log, type='output') #library(data.table) source("workflow/scripts/arbigent_utils/mosaiclassifier_scripts/mosaiClassifier/makeSVcalls.R") probs = readRDS(snakemake@input[["probs"]]) probs <- makeCNcall(probs) write.table(probs, file ...
fdac6bb1604cbfc44db68e7eb2d3060efeea36ba17a2471a942e45b48bcc5593
R
401
8
options(Ncpus = 8L) options(timeout = 99999) ## download time.out options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))) source("https://docs.rstudio.com/rspm/admin/check-user-agent.R") options(repos = c(REPO_NAME = "https://pac...
ca1f5411c9a3697d68cda4d3999a5a0a2ce1d0c34d053c9dd74a5682c43a464e
R
403
20
library(readr) library(stringr) library(dplyr) library(shinyjs) library(GenomeInfoDb) library(shiny) library(BSgenome) devtools::load_all('breaktools') source("graphics.R") options(shiny.maxRequestSize=5*1024^3) options(shiny.sanitize.errors = TRUE) # Remove all VennDiagram report logs for(p in list.files(pattern="^...
7caee0890313105906196718fa87e945835e9ae15088f8b14c29a9deea62b49d
R
426
13
library(data.table) qu = 0.4 print(qu) d = fread("/g/korbel2/weber/MosaiCatcher_output/segmentation/ERR2940607/100000.txt") print(d) print('\n') print(1:max(70)) print(quantile(1:max(70), qu, type = 1)) stop() # type = 1 is important to get discrete values! d = d[, .SD[k == quantile(1:max(k), qu, type = 1)], by=chrom][...
c206942479935b3924c0e7fc8884b87dc76344925bac1b3c14abac5060935977
R
440
17
source("../R/scripts/utils.R") source("../R/scripts/combat.R") data <- read.csv("data/testdata.csv") batch = c(1,1,1,1,1,2,2,2,2,2) pheno <- rep(0, ncol(data)) pheno[c(1,3,5,7,9)] <- 1 mod=model.matrix(~pheno) norm <- combat(data, batch=batch, mod=mod) norm <- norm$dat.combat write.csv(norm, quote=FALSE, file="data/tes...
50613b8de2c20f90f176aeb1d4293d469b73b55f9f44e51ba00273d717e39f88
R
443
13
library(NMF) expr=read.table("dir/results/1711_ASDs_gene_counts_normed_by_limma_686genes_matrix.txt",header=T) print(dim(expr)) expr<-data.frame(expr) rank<-c(2:10) nmf.results<- nmf(expr,rank,nrun=30) save(nmf.results,file="dir/results/1711_686genes_NMF_results_rank_2_10_nrun50_bootstraped_overlapgenes_asd.Rdata") p...
4a3a76880b4d3336626749e1c00d9c5d5b605727a6a2b7027f0edf0f530084d5
R
452
28
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # Functions and Generics # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #' @importFrom rlang %||% #' @export #' rlang::`%||%` #' @importFrom dplyr %>% #' @export #' dplyr::`%>%` #' @importFrom grid un...
c924db4ee5fcc82f814e2ec356f9ffe219daecbd272ea96ad8db9f6d8add7adb
R
452
12
log_input = function(input) { vals = shiny::reactiveValuesToList(input) vals_filter = !grepl("shinyActionButtonValue", sapply(vals, function(z) {paste(class(z), collapse="|")})) vals = vals[vals_filter] vals_pretty = sapply(vals, function(z) { if(is.data.frame(z) & "name" %in% colnames(z)) z = paste(z$name,...
d8aa87cf652c45d0af3822f965012cafaf2519aaeedb7910c66132044c054fcd
R
456
25
# library(pracma) #' Normaliz the columns of x to a length of 1. #' #' @param x n*p matrix #' #' @return xn normalized result #' @export normc #' #' @examples #' #ex1. #' m <- matrix(1:4,2,2,byrow=TRUE) #' normc(m) #' #ex2. #' n <- matrix(rnorm(100,10,1),10,10) #' normc(n) normc <- function(x){ n <- nrow(x) p <- nc...
8a001851465bee0814eb0993400b5f16b577377e0fb22b9227fbc918e9571ed9
R
458
21
# For calculating Fraction of Reads in Peaks library(GenomicAlignments) library(rtracklayer) args <- commandArgs(trailingOnly = TRUE) bam_file <- args[1] peaks_file <- args[2] output_file <- args[3] # Read BAM file reads <- readGAlignments(bam_file) # Read peaks peaks <- import(peaks_file) # Calculate FRIP reads_in...
5a448e60e2cbbf3c67cdc443cc959c144f207c2da80aa74cdb27f567add0c3d9
R
463
24
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## withTooltip <- function( el, title, placement = "bottom", trigger = NULL, options = NULL ) { if (!is.null(trigger)) {} if (!is.null(options)) {} htmltools::tagAppendAttri...
8b2448dbc1cf1770d4c7c2da2a80f2ff80b6fa9725c2bccdab6f3b2da45cf273
R
474
21
connect_db <- function(database_path) { connection <- DBI::dbConnect(RSQLite::SQLite(), dbname = database_path) return(connection) } disconnect_db <- function(connection) { DBI::dbDisconnect(connection) } query_by_email <- function(email, connection) { query_result <- DBI::dbGetQuery(connection, paste0(" ...
40abe105822eb6d1aaee4051ad6856487c05aaa7d704ae7844852abf92743eb9
R
481
13
start_inactivityControl <- function(session, timeout, inactivityCounter) { reactive({ invalidateLater(timeout / 6 * 1000) ia_counts <- isolate(inactivityCounter()) shiny::isolate(inactivityCounter(ia_counts + 1)) ## increase counter ## If >30 min inactivity, close session if (ia_counts == 6) { ...
366bd5ee003b35f634e44b4a86a290604724c0bedaa85400ab60668be201a5d9
R
493
20
library(data.table) library(dplyr) library(LDlinkR) gwas_risk_variants <- fread("$PATH/AppDataProcessing/gwas_risk_variants.csv") dim(gwas_risk_variants) head(gwas_risk_variants) snps <- gwas_risk_variants$RSID for( snp in snps) { print(snp) proxies <- LDproxy(snp=snp,pop="EUR",r2d="r2",token="sometoken") ...
6f79b7170482aab8284a006745f0e4012fd52b9effaa4ac5bca6f2b294ba208c
R
496
12
library(data.table) source("workflow/scripts/mosaiclassifier_scripts/mosaiClassifier/makeSVcalls.R") probs <- readRDS(snakemake@input[["probs"]]) llr <- as.numeric(snakemake@wildcards[["llr"]]) bin_size <- as.numeric(snakemake@wildcards[["window"]]) probs <- mosaiClassifierPostProcessing(probs) probs <- forceBialleli...
0bd493bbcb417862c3ccdf8ffcfe8df659074c79fd2ad1adc4b603797ab23530
R
504
15
Pred_PLS_R <- function(xtrain1, ytrain, xtest1, lv) { source("workflow/scripts/scNOVA_scripts/script_PLSDA/pls_R_scNOVA.R") result_pls <- pls_R(xtrain1, ytrain, lv) B <- matrix(0, lv, lv) that1 <- matrix(0, 1, lv) for (l in 1:lv) { B[l, l] <- result_pls$pls_b[l] that1[1, l] <- t(as.m...
75f1ed121c1142a4bab93e2cb63ba7b3a59a181229f77fca4717828ac7dd6eea
R
517
9
options(Ncpus = 8L) options(timeout = 99999) ## download time.out options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]))) source("https://docs.rstudio.com/rspm/admin/check-user-agent.R") options(repos = c(REPO_NAME = "https://pac...
5b6a159de2353733780058212a9e6fc1c36a2433f42a5d76cbd42aba87e2a1d0
R
532
25
#' Parameter Trasnform functions #' #' @description Parameter Transform Functions #' #' @param x numeric; vector of parameter values #' @param lower numeric; parameter lower bound #' @param upper numeric; parameter upper bound #' #' @return transformed parameter vector #' #' @name transform #' @rdname transform #' ...
1d1d9606d82838dd6409c551ed2df46a0d797fd48937c736e85b1df8f73f3cd6
R
535
29
#run on server as very slow library(iNEXT) setwd("/data2/rawdata/thomaz/coffee/reads/merged/woltka_o/R_alpha/") counts <- read.delim(file = "species.tsv", row.names = 1) row.names(counts) = counts$Name counts <- counts[,-276] print('running Chao1') chao1 <- ChaoRichness(counts) write.csv(chao1, "chao1.csv") pr...
1a1bc65eb9cabcac6d95094649faa68347ca105111644575b02f1f43cd6eadd4
R
544
23
options(error = traceback) args <- commandArgs(TRUE) # add user defined path to load needed libraries .libPaths(c(.libPaths(), args[6])) # library(StrandPhaseR) library(devtools) # source("/g/korbel2/weber/Gits/StrandPhaseR/R/StrandPhase.R") load_all("/g/korbel2/weber/Gits/StrandPhaseR/") print("/g/korbel2/weber/Git...
9e6afd9690733ed5c248ff23d9ab1a94e5dcd1c4aadfffdfdbc80de763d2b0b1
R
553
16
output$aboutOutput <- renderUI({ #get the about file from google drive and then download it aboutFile <- drive_get(id = "1uuE9SF805HDqcCTUQCZhGJZ2IjOXlMfVaAb6B5X_2Qo") data <- drive_download(aboutFile, path = "about.html", overwrite = T, verbose = F) #read the lines from the file and format them file...
5a0902b2020eed0e4f7691bb322355673415b6b72b2aa8e8ce3c711a8d6e033e
R
563
17
start_time <- Sys.time() library(NMF) library(data.table) expr=read.table("dir/results/1711_ASDs_gene_counts_normed_by_limma_686genes_matrix.txt",header=T) print(dim(expr)) expr<-data.frame(expr) rank=3 nmf.results<- nmf(expr,rank,nrun=300) nmf.fit<-fit(nmf.results) w <- basis(nmf.results) h <- coef(nmf.results) featur...
258bee69c963d96b2cc852f142f9e91272ae845dc7050169ceebe6d4c1530010
R
600
22
# For filtering peaks based on quality metrics library(rtracklayer) args <- commandArgs(trailingOnly = TRUE) peaks_file <- args[1] frip_file <- args[2] output_file <- args[3] min_frip <- as.numeric(args[4]) min_score <- as.numeric(args[5]) # Read FRIP score frip <- as.numeric(readLines(frip_file)[1]) # Filter peaks ...
55876a9d82f8311e09756359ac1f529f7d8e1d9d9a919308f5e94a6ba5b11814
R
606
23
options(scipen = 999) # turn-off scientific notation like 1e+48 library(ggplot2) theme_set(theme_bw()) # pre-set the bw theme. data("midwest", package = "ggplot2") # midwest <- read.csv("http://goo.gl/G1K41K") # bkup data source print(midwest) # Scatterplot gg <- ggplot(midwest, aes(x = area, y = poptotal)) + geom...
6d252c8d835a2ec3552e4dac8732c7a131167da5e46375a7c91c71859845c374
R
615
16
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## record_UPGRADE <- function(reportName = "UPGRADE_button") { if (reportName %in% names(UPGRADE_LOGGER$log)) { UPGRADE_LOGGER$log[[reportName]] <- UPGRADE_LOGGER$log[[reportName]] + 1...
caca71970bd3b42a7ff331f6396d88a0f96f5d86f8a3e16891260edbe9ea15d0
R
632
14
library(devtools) load_all("/g/korbel2/weber/Gits/Rsamtools/") load_all("/g/korbel2/weber/Gits/GenomicAlignments/") load_all("/g/korbel2/weber/Gits/StrandPhaseR/") bamfile <- "/g/korbel2/weber/MosaiCatcher_files/tmp/h/RPE1WTPE20401.sort.mdup.bam" bamindex <- "/g/korbel2/weber/MosaiCatcher_files/tmp/h/RPE1WTPE20401.so...
46c4085400bf11f5a214a82dc49cb3b60f767445630ca7a2f28d3a73d502208c
R
646
16
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## record_plot_download <- function(plotName) { if (plotName %in% names(PLOT_DOWNLOAD_LOGGER$log)) { PLOT_DOWNLOAD_LOGGER$log[[plotName]] <- PLOT_DOWNLOAD_LOGGER$log[[plotName]] + 1 ...
99e896bdab2e2030ba8ba4982d9eaf6921130bd9204136fe7143b7a5f07d9455
R
661
21
log <- file(snakemake@log[[1]], open = "wt") sink(file = log, type = "message") sink(file = log, type = "output") source("workflow/scripts/plotting/plot-clustering.R") plot.clustering( inputfile = snakemake@input[["sv_calls"]], bin.bed.filename = snakemake@input[["binbed"]], position.outputfile = snakemake...
c037c4c97e8dd0d103cfe1941d20c30ec1a7a331113b6a0852ac879de946ee2d
R
672
31
--- title: "Agepredictor_neurodev" output: html_document date: "2025-01-26" --- ```{r} library(caret) library(Seurat) library(ggplot2) library(ggpubr) ``` ```{r} load("code/celltypeinvariantmodels_19082024.Rdata") load("code/common_genes_allfetalorganoid.Rdata") fetaldata=readRDS("data/Wang2024_humanfetal.rds") ``` ...
bc7abd829c07b7393eb86307a10c48eefa9edf0a8d486dd975964cea2dcaeff5
R
674
22
# plot_adjust <- function(plots){ library(gridExtra) # Your code, but using p1 and p2, not the plots with adjusted margins gl <- lapply(plots, ggplotGrob) widths <- do.call(grid::unit.pmax, lapply(gl, function (x) x$widths)) #"[[", "widths")) heights <- do.call(grid::unit.pmax, lapply(gl, function (x) x$heig...
38d29275195b6a373cbb2c91d157a96c54e0f7489841f82da7846ede3d2dfb43
R
676
16
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## record_report_download <- function(reportName) { if (reportName %in% names(REPORT_DOWNLOAD_LOGGER$log)) { REPORT_DOWNLOAD_LOGGER$log[[reportName]] <- REPORT_DOWNLOAD_LOGGER$log[[rep...
fd499df72638a631ec763eca72560274805c4d13cbae312d73c0a7b2412d91f7
R
685
13
log <- file(snakemake@log[[1]], open = "wt") sink(file = log, type = "message") sink(file = log, type = "output") system("LC_MEASUREMENT=C") source("workflow/scripts/haplotagging_scripts/haplotagTable.R") paired_end <- sub("\n", "", readChar(snakemake@input[["paired_end"]], file.info(snakemake@input[["paired_end"]])...
82195dacb31d05360a2b1d0bab3052eedfc206a6d4870c7a969c110aa96d9765
R
686
30
## For normalizing the raw data matrix from CAMERA rm(list=ls()) library(preprocessCore) library(ggplot2) library(reshape2) setwd("D://work//skoltech//lipid//writing//GitHub//data") ## for milk ## DATA <- read.csv("milk_FA.rawdata.csv", header= TRUE, row.names = 1) data <- normalize.quantiles(as.mat...
614715c9e4067af7fc2dedde19ab4ca449087e6310caffa610bb04bf71c97d31
R
693
19
library(ggplot2) library(reshape2) args = commandArgs(trailingOnly=TRUE) x = read.table(args[1], header=T) x$gc = x$gcsum / (nrow(x)-1) x$fractionSample = x$fractionSample * 100 x$fractionReference = x$fractionReference * 100 df = melt(x[,c("gc","fractionSample","fractionReference")], id.vars=c("gc")) # Whole genome ...
30490da4bb0d4c0bee754439ded7fb2b9472668674ae045d91e4f5a4b4b062ef
R
710
27
conpred_R <- function(b,w,p,q,lv){ mq <- nrow(q); nq <- ncol(q); mw <- nrow(w); nw <- ncol(w); if (nw != lv){ if (lv > nw){ cat(paste0('Original model has a maximum of ', nw,' LVs Calculating vectors for ', nw, ' LVs only')) lv <- nw; } else { w <- w[,1:lv]; q <- q[,1:lv]; p <- p[,1:lv]; b <- b...
a94926188a32efd14a6ecc11008175e3a60dc50568ff00119de2d9137339517e
R
712
30
dist_matrix = function(x, by.row = FALSE) { x = as.matrix(x); if (by.row == FALSE) { x = t(x) } m = matrix(nrow=nrow(x), ncol=nrow(x)); diag(m) = 0; colnames(m) = rownames(x); rownames(m) = rownames(x); # operates by rows. for (i in 1:(nrow(x)-1)) { me...
b7c0ddceb713ce1f626624dd85ebf6df789b552e002a0b6f0b65ab6d28fd228f
R
722
32
rm(list = ls()) library(harmony) library(Seurat) library(data.table) set.seed(1234) # load data setwd("res_spatialglue") latent <- read.csv("latent_spatialglue.csv", row.names = 1) meta <- read.csv("meta.csv", row.names = 1) latent <- as.matrix(latent) obj <- CreateSeuratObject(counts = t(latent*0), meta.data = meta...
c63d7961ae31222f7cb972943dce9322e906cb2eef32b0ee07bfdc672a063747
R
734
32
rm(list = ls()) library(harmony) library(Seurat) library(data.table) set.seed(1234) # load data setwd("res_spagcn_latent") latent <- read.csv("res_spagcn_sharednet.csv", row.names = 1) meta <- read.csv("meta.csv", row.names = 1) latent <- as.matrix(latent) obj <- CreateSeuratObject(counts = t(latent*0), meta.data = ...
17b09e6dd4834f1062272bb3fe51bc54fe176bd193b292ca785ef71ece639d59
R
736
14
args=commandArgs(trailingOnly=TRUE) Deeptool_result <- read.table(args[1], header=TRUE, sep ='\t', comment.char = "") Deeptool_result_new <- Deeptool_result[,4:ncol(Deeptool_result)] Ref_bed <- read.table(args[2], header=F, sep ='\t', comment.char = "") if (ncol(Deeptool_result)==4){Deeptool_result_new <- as.matrix(D...
7ea6d0d6b7024e57bcaded5c55c2c8ba3b7b65db5f7852d4d2c871159846ffa2
R
740
21
log <- file(snakemake@log[[1]], open = "wt") sink(file = log, type = "message") sink(file = log, type = "output") source("workflow/scripts/mosaiclassifier_scripts/haplotagProbs.R") haplotagCounts <- fread(snakemake@input[["haplotag_table"]]) probs <- readRDS(snakemake@input[["sv_probs_table"]]) # FIXME : tmp solutio...
a6580ff67bfd468e59353031e4297300d92ef236993867a31e6ce3798eac9bd6
R
752
27
## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## library(shiny) ## RUN FROM root folder! setwd(pkgload::pkg_path()) source("shiny/global.R") ## global variable source("R/00Headers.R") ## global variable load("data/example-data.pgx",v...
f9f12f6b36551c7eba7fda86e6368192106ae1edf5b082779d3f5489aea22047
R
760
32
rm(list = ls()) library(harmony) library(Seurat) library(data.table) set.seed(1234) # load data setwd("run_stagate_harmony") latent <- read.csv("latent_stagate_sharednet.csv", row.names = 1) meta <- read.csv("meta_stagate_sharednet.csv", row.names = 1) latent <- as.matrix(latent) obj <- CreateSeuratObject(counts = t...
c25d569fad88c2f011b182ccbbc5a1a1b05da40940e8081d8698913ffcc46a4d
R
785
28
# QQ plots ## load packages library(ggplot2) library(ggrepel) library(CMplot) data <- $path_to_TWAS setwd("/Users/leofanfever/Documents/Biostatistics/TIGAR/Thesis/Manuscript/Figures/Supplementary/QQplots/") columns <- c("p_DPR", "p_EN", "p_FUSION", "p_ACAT") for (i in 1:4) { p_values <- as.numeric(na.omit(data[[co...
be4214165a6d780eaed3da328896ce105149a823bbe4a4d072dfc28698b03a50
R
840
34
AD_DPR <- $path_to_TWAS_DPR AD_EN <- $path_to_TWAS_EN AD_FUSION <- $path_to_TWAS_FUSION AD_DPR <- AD_DPR[,c(1:5,10)] AD_EN <- AD_EN[,c(1:5,10)] AD_FUSION <- AD_FUSION[,c(1:5,10)] colnames(AD_DPR)[6] <- "p_DPR" colnames(AD_EN)[6] <- "p_EN" colnames(AD_FUSION)[6] <- "p_FUSION" library(dplyr) result <- AD_DPR %>% ful...
da7de85865160a143277fd8ef3430fde1334bfc84b5bad5c80d559bf0eb79ab6
R
844
22
# log <- file(snakemake@log[[1]], open = "wt") # sink(file = log, type = "message") # sink(file = log, type = "output") args <- commandArgs(trailingOnly = T) source("utils/haplotagProbs.R") haplotagCounts <- fread(args[1]) probs <- readRDS(args[2]) # FIXME : tmp solution to fix error : Segments must covered all bins...
d443a27e71df82ff2c33305d7fade8aa1ace9fc92b99aae34234c2cd41016fee
R
865
39
## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. MODULE.epigenomics <- list( module_menu = function() { c( ideograms = "Beta Ideograms" ) }, module_ui = function() { list( bigdash::bigTabItem( "ideograms-t...
a741a3f83e5bdf7086efe5f24d55e727f611c77ad8fdd4d50e7090345d2ed72a
R
884
17
# sink(snakemake@log[[1]]) library(data.table) d = fread("/g/korbel2/weber/MosaiCatcher_output/Mosaicatcher_output_HGSVC_correct/segmentation/HTN7CAFXY_HG02492x02_19s003809-1-1/Selection_initial_strand_state") print(d) print(unique(d$cell)) print(unique(d$sample)) e = fread("/g/korbel2/weber/MosaiCatcher_output/Mosaica...
d4edec32e223f2aa0b51032834b1ef3025c0269155db70e864ef1e9e10f47c17
R
889
28
library(scRNAseq) my_data <- list( baron = BaronPancreasData(), lawlor = LawlorPancreasData(), seger = SegerstolpePancreasData(), muraro = MuraroPancreasData() ) rownames(my_data$muraro) <- rowData(my_data$muraro)$symbol my_data$muraro <- my_data$muraro[!duplicated(rownames(my_data$muraro)),] library(org.Hs.e...
100d9645e47ce845884038c1a56fe65e9394f146c1b11648cba484bc3fec9ac1
R
895
25
library(PubChemR) library(RefMet) library(tidyverse) res <- get_aids(urmets, namespace = "name") a <- AIDs(res) setdiff(urmets, unique(a$NAME)) write.csv(data.frame(NAME = urmets %>% str_remove("Paraxanthine / ") %>% str_replace_all(pattern = "`|′|’", replacement = "'"...
d0c7c0e9ce48dc7d243709588ed9af83833f2e82ecd12cc7e3506ec379402e6c
R
910
35
## ## Initialize (prepopulate) AnnotationHub cache with main species ## ## ## This file is part of the Omics Playground project. ## Copyright (c) 2018-2026 BigOmics Analytics SA. All rights reserved. ## if(1) { if(!require("org.Hs.eg.db")) BiocManager::install("org.Hs.eg.db") if(!require("org.Mm.eg.db")) BiocManag...
171e3ec161f7c31e53a59df4871fe29e7ea40bdcbe2edfa78717020a0c2bb725
R
960
25
rm(list=setdiff(ls(),c('params','grp'))) basedir <- params$basedir setwd(basedir) savedir <- paste(params$opdir,'G20vsNTG/',sep='') tp <- c(1,3,6) tf = 0.5 load(paste(savedir,'NTGSyntimeconstantsTF',tf,'.RData',sep='')) c.train.NTG <- c.train.Grp r.NTG <- r.Grp load(paste(savedir,'G20SyntimeconstantsTF',tf,'.RData',s...